diff options
author | Erich Eckner <git@eckner.net> | 2020-05-19 18:46:23 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-05-19 18:52:06 +0200 |
commit | caa2f817c72ebfc380275c806060113b0896fd0c (patch) | |
tree | abae190cfbbf3f64458a9b227ba7a5e10ddd323f | |
parent | 4c7c6ddecd33ec4dd33ed17b787faf2956572645 (diff) | |
download | arch-mirror-caa2f817c72ebfc380275c806060113b0896fd0c.tar.xz |
arch-mirror: really set --exclude for /archlinuxarm/
-rwxr-xr-x | arch-mirror | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch-mirror b/arch-mirror index 9930ce2..38f917a 100755 --- a/arch-mirror +++ b/arch-mirror @@ -58,6 +58,13 @@ retrieve_file() { retrieve_content() { local url="$1" local destination="$2" + + if [ -z "${destination##*/archlinuxarm/}" ]; then + extra_options='--exclude os' + else + unset extra_options + fi + case "${url%%://*}" in 'rsync') rsync ${rsync_options} ${extra_options} ${quiet} "${url}" "${destination}" @@ -195,12 +202,6 @@ fetch_lastsync() { if [ $# -eq 2 ] && [ "$1" = 'mirror' ]; then to_sync="$2" - 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 |