From 36bb82a57dcea446362ef7fddd1767a679ec0005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E9=82=88?= Date: Fri, 8 Dec 2017 04:52:11 +0800 Subject: [PATCH] add script for winehq --- winehq.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 winehq.sh diff --git a/winehq.sh b/winehq.sh new file mode 100755 index 0000000..c53ff5e --- /dev/null +++ b/winehq.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +function sync_winehq() { + repo_url="$1" + repo_dir="$2" + + [ ! -d "$repo_dir" ] && mkdir -p "$repo_dir" + cd $repo_dir + lftp "${repo_url}/" -e "mirror --verbose --exclude wine-builds.old/ -P 5 --delete --only-newer; bye" +} + +BASE_URL=${TUNASYNC_UPSTREAM_URL:-"ftp://ftp.winehq.org/pub/"} +sync_winehq "${BASE_URL}" "${TUNASYNC_WORKING_DIR}"