mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 12:42:50 +00:00
mirror docker-ce with lftp
This commit is contained in:
parent
ec9eed3a26
commit
469795ecc8
16
docker-ce.sh
Executable file
16
docker-ce.sh
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# requires: lftp wget jq
|
||||||
|
|
||||||
|
BASE_URL="${TUNASYNC_UPSTREAM_URL:-"https://download.docker.com/linux/"}"
|
||||||
|
|
||||||
|
function sync_docker_ce() {
|
||||||
|
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_docker_ce "${BASE_URL}" "${TUNASYNC_WORKING_DIR}/"
|
Loading…
x
Reference in New Issue
Block a user