diff options
| author | onefang | 2025-12-03 05:34:22 +0100 |
|---|---|---|
| committer | onefang | 2025-12-03 05:34:22 +0100 |
| commit | f8654ee2a3e02390f8d02fcff0c0b924608e2096 (patch) | |
| tree | fed8c90234c8dd2042568c211d80fd1e6ffa20fc | |
| parent | Tweak docs. (diff) | |
| download | devuan_package_mirror_sync-f8654ee2a3e02390f8d02fcff0c0b924608e2096.zip devuan_package_mirror_sync-f8654ee2a3e02390f8d02fcff0c0b924608e2096.tar.gz devuan_package_mirror_sync-f8654ee2a3e02390f8d02fcff0c0b924608e2096.tar.bz2 devuan_package_mirror_sync-f8654ee2a3e02390f8d02fcff0c0b924608e2096.tar.xz | |
| -rwxr-xr-x | devuan_package_mirror_sync.sh | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/devuan_package_mirror_sync.sh b/devuan_package_mirror_sync.sh index 44cdfd7..7758313 100755 --- a/devuan_package_mirror_sync.sh +++ b/devuan_package_mirror_sync.sh | |||
| @@ -94,20 +94,20 @@ mkdir -p ${MIRROR_PATH} | |||
| 94 | 94 | ||
| 95 | # The rsync calls. | 95 | # The rsync calls. |
| 96 | # The --exclude "/devuan-cd/" is so we don't wipe out the ISO mirror. | 96 | # The --exclude "/devuan-cd/" is so we don't wipe out the ISO mirror. |
| 97 | start_time=$(date +%s%3N) | 97 | startTime=$(date +%s%3N) |
| 98 | rsltM=$( ${BEHAVE} rsync ${OPTIONS} vesta@pkgmaster.devuan.org:~/devuan/ ${MIRROR_PATH} --exclude "/devuan-cd/" \ | 98 | resultM=$( ${BEHAVE} rsync ${OPTIONS} vesta@pkgmaster.devuan.org:~/devuan/ ${MIRROR_PATH} --exclude "/devuan-cd/" \ |
| 99 | --exclude "Packages*" --exclude "Sources*" --exclude "Release*" --exclude "InRelease" --exclude "Contents-*" --exclude "Translation-*" --exclude "ls-lR*" --exclude "current" --exclude ".~tmp~" ) | 99 | --exclude "Packages*" --exclude "Sources*" --exclude "Release*" --exclude "InRelease" --exclude "Contents-*" --exclude "Translation-*" --exclude "ls-lR*" --exclude "current" --exclude ".~tmp~" ) |
| 100 | end_time=$(date +%s%3N) ; durationM=$((end_time - start_time)) | 100 | endTime=$(date +%s%3N) ; durationM=$((endTime - startTime)) |
| 101 | 101 | ||
| 102 | start_time=$(date +%s%3N) | 102 | startTime=$(date +%s%3N) |
| 103 | rsltC=$( ${BEHAVE} rsync ${OPTIONS} -l --delete-delay vesta@pkgmaster.devuan.org:~/devuan/ ${MIRROR_PATH} --exclude "/devuan-cd/" ) | 103 | resultC=$( ${BEHAVE} rsync ${OPTIONS} -l --delete-delay vesta@pkgmaster.devuan.org:~/devuan/ ${MIRROR_PATH} --exclude "/devuan-cd/" ) |
| 104 | end_time=$(date +%s%3N) ; durationC=$((end_time - start_time)) | 104 | endTime=$(date +%s%3N) ; durationC=$((endTime - startTime)) |
| 105 | 105 | ||
| 106 | 106 | ||
| 107 | # Report the results. | 107 | # Report the results. |
| 108 | rsltM=$( 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 ) | 108 | resultM=$( echo "$resultM" | grep -Ev '/$|\.svg|\.txt$|\.txt.old$|versionlog\.state|log/sources|aintainers$|/by-hash/|skipping non-regular file' | head -n -4 | tail -n +2 ) |
| 109 | rsltC=$( echo "$rsltC" | grep -Ev '/$|\.svg|\.txt$|\.txt.old$|versionlog\.state|log/sources|aintainers$|/by-hash/' | head -n -3 | tail -n +2 ) | 109 | resultC=$( echo "$resultC" | grep -Ev '/$|\.svg|\.txt$|\.txt.old$|versionlog\.state|log/sources|aintainers$|/by-hash/' | head -n -3 | tail -n +2 ) |
| 110 | if [ -n "$rsltM" ] ; then echo -e "$rsltM\n"; fi | 110 | if [ -n "$resultM" ] ; then echo -e "$resultM\n"; fi |
| 111 | if [ $durationM -gt 4000 ] || [ -n "$rsltM" ] ; then echo -e "Main rsync time: $durationM ms.\n"; fi | 111 | if [ $durationM -gt 4000 ] || [ -n "$resultM" ] ; then echo -e "Main rsync time: $durationM ms.\n"; fi |
| 112 | if [ -n "$rsltC" ] ; then echo -e "$rsltC\n"; fi | 112 | if [ -n "$resultC" ] ; then echo -e "$resultC\n"; fi |
| 113 | if [ $durationC -gt 3000 ] || [ -n "$rsltC" ] ; then echo -e "Clean up rsync time: $durationC ms.\n"; fi | 113 | if [ $durationC -gt 3000 ] || [ -n "$resultC" ] ; then echo -e "Clean up rsync time: $durationC ms.\n"; fi |
