summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-05-20 22:47:04 +0200
committerErich Eckner <git@eckner.net>2020-05-20 22:47:04 +0200
commit37a60b72d3947be13fcd8721372d0006e4213b43 (patch)
treee414dd284131a5bfcc46844e8749afaf6e331dc2
parent85517a891901e2acb5b5c931384350faf09244dc (diff)
downloadarch-mirror-37a60b72d3947be13fcd8721372d0006e4213b43.tar.xz
arch-mirror: change verbosity
-rwxr-xr-xarch-mirror16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch-mirror b/arch-mirror
index 048a9ca..e0305f0 100755
--- a/arch-mirror
+++ b/arch-mirror
@@ -11,10 +11,14 @@ fi
mirror_dir='/srv/http/arch'
-rsync_options='-rtlvH --safe-links --delete-after --progress -h --timeout=600 --contimeout=60 -p --delay-updates --no-motd --temp-dir='"${mirror_dir}"'/.tmp --exclude .tmp'
-
-if ! stty &>/dev/null; then
- quiet="-q"
+rsync_options='-rtlH --safe-links --delete-after --progress -h --timeout=600 --contimeout=60 -p --delay-updates --no-motd --temp-dir='"${mirror_dir}"'/.tmp --exclude .tmp'
+
+if stty &>/dev/null; then
+ rsync_verbose='-v'
+ wget_verbose='-v'
+else
+ rsync_verbose=''
+ wget_verbose='-nv'
fi
retrieve_listing() {
@@ -67,10 +71,10 @@ retrieve_content() {
case "${url%%://*}" in
'rsync')
- rsync ${rsync_options} ${extra_options} ${quiet} "${url}" "${destination}"
+ rsync ${rsync_options} ${rsync_verbose} ${extra_options} "${url}" "${destination}"
;;
'https'|'http')
- wget --mirror -nH -np ${quiet} -P "${destination}" --cut-dirs $(
+ wget --mirror -nH -np ${wget_verbose} -P "${destination}" --cut-dirs $(
echo "${url#*//}" \
| tr -d '\n' \
| tr '/' '\n' \