From 4c799781ccf70cd503bb090e5f9d0d3558655d7f Mon Sep 17 00:00:00 2001 From: tuna-mirror-server Date: Sun, 15 Nov 2015 00:46:00 +0800 Subject: [PATCH] openwrt --- scripts/openwrt.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 scripts/openwrt.sh diff --git a/scripts/openwrt.sh b/scripts/openwrt.sh new file mode 100755 index 0000000..372d696 --- /dev/null +++ b/scripts/openwrt.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +function sync_openwrt() { + repo_url="$1" + repo_dir="$2" + + [ ! -d "$repo_dir" ] && mkdir -p "$repo_dir" + cd $repo_dir + lftp "${repo_url}/" -e "mirror --verbose -P 5 --delete --only-newer; bye" +} + +sync_openwrt "http://downloads.openwrt.org/chaos_calmer/15.05/" "${TUNASYNC_WORKING_DIR}/chaos_calmer/15.05" +sync_openwrt "http://downloads.openwrt.org/snapshots/trunk/" "${TUNASYNC_WORKING_DIR}/snapshots/trunk"