mirror of
https://github.com/tuna/tunasync.git
synced 2025-04-21 04:42:46 +00:00
update nodesource and docker script
This commit is contained in:
parent
3776f11057
commit
c96b7aa2e1
16
scripts/docker.sh
Executable file
16
scripts/docker.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
function sync_docker() {
|
||||
repo_url="$1"
|
||||
repo_dir="$2"
|
||||
|
||||
[ ! -d "$repo_dir" ] && mkdir -p "$repo_dir"
|
||||
cd $repo_dir
|
||||
# lftp "${repo_url}/" -e "mirror --verbose --exclude-glob='*/SRPMS/*' -P 5 --delete --only-newer; bye"
|
||||
# lftp "${repo_url}/" -e "mirror --verbose -P 5 --delete --only-newer; bye"
|
||||
wget --mirror --convert-links --no-parent --no-host-directories $repo_url
|
||||
find . -type f -iname "*.1" -exec rm {} \;
|
||||
}
|
||||
|
||||
sync_docker "http://apt.dockerproject.org/" "${TUNASYNC_WORKING_DIR}/apt"
|
||||
sync_docker "http://yum.dockerproject.org/" "${TUNASYNC_WORKING_DIR}/yum"
|
@ -1,14 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
function sync_repo_ck() {
|
||||
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 --log=${TUNASYNC_LOG_FILE} --exclude-glob='*/SRPMS/*' -P 5 --delete --only-newer; bye"
|
||||
# lftp "${repo_url}/" -e "mirror --verbose --exclude-glob='*/SRPMS/*' -P 5 --delete --only-newer; bye"
|
||||
lftp "${repo_url}/" -e "mirror --verbose -P 5 --delete --only-newer; bye"
|
||||
}
|
||||
|
||||
sync_repo_ck "https://deb.nodesource.com/node" "${TUNASYNC_WORKING_DIR}/deb"
|
||||
sync_repo_ck "https://rpm.nodesource.com/pub" "${TUNASYNC_WORKING_DIR}/rpm"
|
||||
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://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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user