diff options
author | Erich Eckner <git@eckner.net> | 2020-07-13 11:22:42 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-07-13 11:22:42 +0200 |
commit | 86a12aa4f922e9095919d2d4ac643583e8304415 (patch) | |
tree | 05ec75332dfd8303c44eb1b0924a5c1877d5d487 | |
parent | 7eb3108442057bcd06840a6747580189ecc949c9 (diff) | |
download | arch-mirror-86a12aa4f922e9095919d2d4ac643583e8304415.tar.xz |
arch-mirror: no timeout for archlinux32
-rwxr-xr-x | arch-mirror | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/arch-mirror b/arch-mirror index cf20ef4..72d7fbf 100755 --- a/arch-mirror +++ b/arch-mirror @@ -64,6 +64,8 @@ retrieve_file() { retrieve_content() { local url="$1" local destination="$2" + local extra_options + local timeout if [ -z "${destination##*/archlinuxarm/}" ]; then extra_options='--exclude os' @@ -71,13 +73,19 @@ retrieve_content() { unset extra_options fi + if [ -z "${destination##*/archlinux32/}" ]; then + unset timeout + else + timeout="${total_timeout}" + fi + case "${url%%://*}" in 'rsync') - timeout ${total_timeout} rsync ${rsync_options} ${rsync_verbose} ${extra_options} "${url}" "${destination}" \ + timeout ${timeout} rsync ${rsync_options} ${rsync_verbose} ${extra_options} "${url}" "${destination}" \ || return $? ;; 'https'|'http') - timeout ${total_timeout} wget --mirror --prefer-family=Ipv4 -nH -np ${wget_verbose} -P "${destination}" --cut-dirs $( + timeout ${timeout} wget --mirror --prefer-family=Ipv4 -nH -np ${wget_verbose} -P "${destination}" --cut-dirs $( echo "${url#*//}" \ | tr -d '\n' \ | tr '/' '\n' \ |