mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 12:42:50 +00:00
21 lines
901 B
Bash
Executable File
21 lines
901 B
Bash
Executable File
#!/bin/bash
|
|
|
|
function sync_nodesource() {
|
|
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_nodesource "https://deb.nodesource.com/node" "${TUNASYNC_WORKING_DIR}/deb"
|
|
sync_nodesource "https://deb.nodesource.com/node_0.12" "${TUNASYNC_WORKING_DIR}/deb_0.12"
|
|
sync_nodesource "https://deb.nodesource.com/node_4.x" "${TUNASYNC_WORKING_DIR}/deb_4.x"
|
|
sync_nodesource "https://deb.nodesource.com/node_6.x" "${TUNASYNC_WORKING_DIR}/deb_6.x"
|
|
|
|
sync_nodesource "https://rpm.nodesource.com/pub" "${TUNASYNC_WORKING_DIR}/rpm"
|
|
sync_nodesource "https://rpm.nodesource.com/pub_0.12" "${TUNASYNC_WORKING_DIR}/rpm_0.12"
|
|
sync_nodesource "https://rpm.nodesource.com/pub_4.x" "${TUNASYNC_WORKING_DIR}/rpm_4.x"
|
|
sync_nodesource "https://rpm.nodesource.com/pub_6.x" "${TUNASYNC_WORKING_DIR}/rpm_6.x"
|