aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoronefang2025-11-27 04:21:24 +0100
committeronefang2025-11-27 04:21:24 +0100
commitfdc99319a41455203dc234607a692a870d869eb3 (patch)
treec23361bab4b06a24a4195ac9b4e1c39b4e393f4c
parentTidy things up, and only say the important things. (diff)
downloaddevuan_package_mirror_sync-fdc99319a41455203dc234607a692a870d869eb3.zip
devuan_package_mirror_sync-fdc99319a41455203dc234607a692a870d869eb3.tar.gz
devuan_package_mirror_sync-fdc99319a41455203dc234607a692a870d869eb3.tar.bz2
devuan_package_mirror_sync-fdc99319a41455203dc234607a692a870d869eb3.tar.xz
More screwing with the output.
-rwxr-xr-xdevuan_package_mirror_sync.sh38
1 files changed, 19 insertions, 19 deletions
diff --git a/devuan_package_mirror_sync.sh b/devuan_package_mirror_sync.sh
index 75e23a2..bb8fa66 100755
--- a/devuan_package_mirror_sync.sh
+++ b/devuan_package_mirror_sync.sh
@@ -71,29 +71,29 @@ OPTIONS="--delay-updates -rptSzhhv --no-motd --chown mirrors:www-data -M-
71# --remote-option=OPT, -M send OPTION to the remote side only 71# --remote-option=OPT, -M send OPTION to the remote side only
72 72
73 73
74# These helped -
75# https://git.devuan.org/devuan/amprolla3/src/branch/test/deployment/orchestrate.sh#L84
76# https://chrisgilmerproj.github.io/debian/mirror/rsync/2013/08/29/mirror-debian.html
77# https://pkgmaster.devuan.org/devuan_mirror_walkthrough.txt
78
79# Investigated rsync batch mode, seems crap for our use.
80
74 81
75mkdir -p ${MIRROR_PATH} 82mkdir -p ${MIRROR_PATH}
83
76# The --exclude "/devuan-cd/" is so we don't wipe out the ISO mirror. 84# The --exclude "/devuan-cd/" is so we don't wipe out the ISO mirror.
77start_time=$(date +%s%3N) 85start_time=$(date +%s%3N)
78rslt=$( ${BEHAVE} rsync ${OPTIONS} vesta@pkgmaster.devuan.org:~/devuan/ ${MIRROR_PATH} --exclude "/devuan-cd/" \ 86rsltM=$( ${BEHAVE} rsync ${OPTIONS} vesta@pkgmaster.devuan.org:~/devuan/ ${MIRROR_PATH} --exclude "/devuan-cd/" \
79 --exclude "Packages*" --exclude "Sources*" --exclude "Release*" --exclude "InRelease" --exclude "Contents-*" --exclude "Translation-*" --exclude "ls-lR*" --exclude "current" --exclude ".~tmp~" \ 87 --exclude "Packages*" --exclude "Sources*" --exclude "Release*" --exclude "InRelease" --exclude "Contents-*" --exclude "Translation-*" --exclude "ls-lR*" --exclude "current" --exclude ".~tmp~" )
80 | grep -Ev '/$|\.svg|\.txt$|\.txt.old$|versionlog\.state|log/sources|aintainers$|/by-hash/|skipping non-regular file' | head -n -4 | tail -n +2 ) 88end_time=$(date +%s%3N) ; durationM=$((end_time - start_time))
81end_time=$(date +%s%3N) ; duration_ms=$((end_time - start_time))
82echo -n "$rslt"; if [ -n "$rslt" ] ; then echo ""; fi
83if [ $duration_ms -gt 2000 ] ; then echo -e "Main rsync time in ms: $duration_ms\n"; fi
84 89
85start_time=$(date +%s%3N) 90start_time=$(date +%s%3N)
86rslt=$( ${BEHAVE} rsync ${OPTIONS} -l --delete-delay vesta@pkgmaster.devuan.org:~/devuan/ ${MIRROR_PATH} --exclude "/devuan-cd/" \ 91rsltC=$( ${BEHAVE} rsync ${OPTIONS} -l --delete-delay vesta@pkgmaster.devuan.org:~/devuan/ ${MIRROR_PATH} --exclude "/devuan-cd/" )
87 | grep -Ev '/$|\.svg|\.txt$|\.txt.old$|versionlog\.state|log/sources|aintainers$|/by-hash/' | head -n -3 | tail -n +2 ) 92end_time=$(date +%s%3N) ; durationC=$((end_time - start_time))
88end_time=$(date +%s%3N) ; duration_ms=$((end_time - start_time))
89echo -n "$rslt"; if [ -n "$rslt" ] ; then echo ""; fi
90if [ $duration_ms -gt 1000 ] ; then echo "Clean up rsync time in ms: $duration_ms"; fi
91 93
92 94rsltM=$( echo "$rsltM" | grep -Ev '/$|\.svg|\.txt$|\.txt.old$|versionlog\.state|log/sources|aintainers$|/by-hash/|skipping non-regular file' | head -n -4 | tail -n +2 )
93 95rsltC=$( echo "$rsltC" | grep -Ev '/$|\.svg|\.txt$|\.txt.old$|versionlog\.state|log/sources|aintainers$|/by-hash/' | head -n -3 | tail -n +2 )
94# These helped - 96if [ -n "$rsltM" ] ; then echo -e "$rsltM\n"; fi
95# https://git.devuan.org/devuan/amprolla3/src/branch/test/deployment/orchestrate.sh#L84 97if [ $durationM -gt 3000 ] || [ -n "$rsltM" ] ; then echo -e "Main rsync time: $durationM ms.\n"; fi
96# https://chrisgilmerproj.github.io/debian/mirror/rsync/2013/08/29/mirror-debian.html 98if [ -n "$rsltC" ] ; then echo -e "$rsltC\n"; fi
97# https://pkgmaster.devuan.org/devuan_mirror_walkthrough.txt 99if [ $durationC -gt 2000 ] || [ -n "$rsltC" ] ; then echo -e "Clean up rsync time: $durationC ms.\n"; fi
98
99# Investigated rsync batch mode, seems crap for our use.