diff options
author | Erich Eckner <git@eckner.net> | 2020-05-12 00:07:57 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-05-12 00:07:57 +0200 |
commit | d3ddbcb1544b04a4d720dd2ab3eb0710a7497a64 (patch) | |
tree | 5d63d911fd0c7616d29be8463b7a837271948b3e | |
parent | 7a693ccc27ca0671878a0a5ddfabec459b448d4f (diff) | |
download | arch-mirror-d3ddbcb1544b04a4d720dd2ab3eb0710a7497a64.tar.xz |
arch-mirror: ignore /os/ on archlinuxarm mirror
-rwxr-xr-x | arch-mirror | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch-mirror b/arch-mirror index 1d9b702..ee45a2f 100755 --- a/arch-mirror +++ b/arch-mirror @@ -128,6 +128,12 @@ printf '%s\n' "${far_mirrors[@]}" "${close_mirrors[@]}" \ | sort -u \ | while read -r to_sync; do + if [ "${to_sync}" = '/archlinuxarm/' ]; then + extra_options='--exclude os' + else + unset extra_options + fi + for file in 'lastsync' 'lastupdate'; do for dir in '' 'os/'; do if [ -f "${mirror_dir}${to_sync}${dir}${file}" ]; then @@ -168,7 +174,7 @@ printf '%s\n' "${far_mirrors[@]}" "${close_mirrors[@]}" \ if [ "${level}" -le "${last_successful_level}" ]; then continue fi - if rsync ${rsync_options} ${quiet} "${url}" "${mirror_dir}${to_sync}"; then + if rsync ${rsync_options} ${extra_options} ${quiet} "${url}" "${mirror_dir}${to_sync}"; then last_successful_level="${level}" fi done |