diff options
| author | onefang | 2025-11-04 01:39:46 +0100 |
|---|---|---|
| committer | onefang | 2025-11-04 01:39:46 +0100 |
| commit | 617e5ef33f8570257fee2821efbc379ba6a767ed (patch) | |
| tree | ed7a316876f28b70fdca3f3e88fcb1670bc89d1b | |
| parent | TYPO-- (diff) | |
| download | devuan_package_mirror_sync-617e5ef33f8570257fee2821efbc379ba6a767ed.zip devuan_package_mirror_sync-617e5ef33f8570257fee2821efbc379ba6a767ed.tar.gz devuan_package_mirror_sync-617e5ef33f8570257fee2821efbc379ba6a767ed.tar.bz2 devuan_package_mirror_sync-617e5ef33f8570257fee2821efbc379ba6a767ed.tar.xz | |
Only do links in the second call.
| -rwxr-xr-x | devuan_package_mirror_sync.sh | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/devuan_package_mirror_sync.sh b/devuan_package_mirror_sync.sh index 1e8b061..5a87a04 100755 --- a/devuan_package_mirror_sync.sh +++ b/devuan_package_mirror_sync.sh | |||
| @@ -32,7 +32,7 @@ BEHAVE="ionice -c3 nice -n 19" | |||
| 32 | # (which doesn't affect the sorted transfer order, but does make the final file-updating phase happen much more rapidly). | 32 | # (which doesn't affect the sorted transfer order, but does make the final file-updating phase happen much more rapidly). |
| 33 | # NOTE - Seems we have to use the double rsync method, coz symlinks update in the wrong order, no matter what we do. | 33 | # NOTE - Seems we have to use the double rsync method, coz symlinks update in the wrong order, no matter what we do. |
| 34 | 34 | ||
| 35 | OPTIONS="--delay-updates -rlptSzhhv --no-motd --chown mirrors:www-data -M--open-noatime" | 35 | OPTIONS="--delay-updates -rptSzhhv --no-motd --chown mirrors:www-data -M--open-noatime" |
| 36 | # --verbose, -v increase verbosity | 36 | # --verbose, -v increase verbosity |
| 37 | # --no-motd suppress daemon-mode MOTD | 37 | # --no-motd suppress daemon-mode MOTD |
| 38 | # --archive, -a archive mode is -rlptgoD (no -A,-X,-U,-N,-H) | 38 | # --archive, -a archive mode is -rlptgoD (no -A,-X,-U,-N,-H) |
| @@ -78,15 +78,16 @@ EXCLUDES="--exclude Packages* \ | |||
| 78 | --exclude Contents-* \ | 78 | --exclude Contents-* \ |
| 79 | --exclude Translation-* \ | 79 | --exclude Translation-* \ |
| 80 | --exclude ls-lR* \ | 80 | --exclude ls-lR* \ |
| 81 | --exclude current \ | ||
| 81 | --exclude .~tmp~" | 82 | --exclude .~tmp~" |
| 82 | 83 | ||
| 83 | mkdir -p ${MIRROR_PATH} | 84 | mkdir -p ${MIRROR_PATH} |
| 84 | # The --exclude "/devuan-cd/" is so we don't wipe out the ISO mirror. | 85 | # The --exclude "/devuan-cd/" is so we don't wipe out the ISO mirror. |
| 85 | time $BEHAVE flock -n ${MIRROR_PATH}/devuan rsync ${OPTIONS} vesta@pkgmaster.devuan.org:~/devuan/ ${MIRROR_PATH} --exclude "/devuan-cd/" $EXCLUDES \ | 86 | time $BEHAVE flock -n ${MIRROR_PATH}/devuan rsync ${OPTIONS} vesta@pkgmaster.devuan.org:~/devuan/ ${MIRROR_PATH} --exclude "/devuan-cd/" $EXCLUDES \ |
| 86 | | grep -Ev '/$|\.svg|\.txt$|\.txt.old$|versionlog\.state|log/sources|aintainers$' | head -n -1 | tail -n +2 | 87 | | grep -Ev '/$|\.svg|\.txt$|\.txt.old$|versionlog\.state|log/sources|aintainers$|skipping non-regular file' | head -n -1 | tail -n +2 |
| 87 | echo "" | 88 | echo "" |
| 88 | time $BEHAVE flock -n ${MIRROR_PATH}/devuan rsync ${OPTIONS} --delete-delay vesta@pkgmaster.devuan.org:~/devuan/ ${MIRROR_PATH} --exclude "/devuan-cd/" \ | 89 | time $BEHAVE flock -n ${MIRROR_PATH}/devuan rsync ${OPTIONS} -l --delete-delay vesta@pkgmaster.devuan.org:~/devuan/ ${MIRROR_PATH} --exclude "/devuan-cd/" \ |
| 89 | | grep -Ev '/$|\.svg|\.txt$|\.txt.old$|versionlog\.state|log/sources|aintainers$' | head -n -1 | tail -n +2 | 90 | | grep -Ev '/$|\.svg|\.txt$|\.txt.old$|versionlog\.state|log/sources|aintainers$' | head -n -1 | tail -n +2 |
| 90 | 91 | ||
| 91 | 92 | ||
| 92 | # These helped - | 93 | # These helped - |
