index : devops | |
Archlinux32 devs' convenience-scripts | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-10-17 10:58:31 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-10-17 10:58:31 +0200 |
commit | 80174ad842ddcdef900fc00aa2b717ab818b61cc (patch) | |
tree | ce4910444e42ebf72762808f96b5de0fc8ab497e /find-bootstrap-duplicates | |
parent | e6825217d7ede25c7649235d2490b77dad908fea (diff) |
-rwxr-xr-x | find-bootstrap-duplicates | 29 |
diff --git a/find-bootstrap-duplicates b/find-bootstrap-duplicates index b471712..6d80e03 100755 --- a/find-bootstrap-duplicates +++ b/find-bootstrap-duplicates @@ -1,7 +1,7 @@ #!/bin/bash bootstrap_mirror='https://archlinux32.andreasbaumann.cc/bootstrap/i486' -bootstrap_prefix='bootstrap-' +bootstrap_prefix='bootstrap' mirror='https://mirror.archlinux32.org' tmp_dir=$(mktemp -d) @@ -14,9 +14,10 @@ for repo in \ 'testing' \ 'community-testing' \ 'staging' \ - 'community-staging'; do + 'community-staging' \ + ''; do - curl -Ss "${bootstrap_mirror}/${repo}/${bootstrap_prefix}${repo}.db.tar.gz" | \ + curl -Ss "${bootstrap_mirror}/${repo}/${bootstrap_prefix}${repo+-}${repo}.db.tar.gz" | \ tar -tz 2>/dev/null | \ sed -n ' s,\(-[^-]\+\)\{2\}/$,, @@ -25,16 +26,18 @@ for repo in \ ' >> \ "${tmp_dir}/bootstrap" - for arch in 'i486' 'i686'; do - curl -Ss "${mirror}/${arch}/${repo}/${repo}.db.tar.gz" | \ - tar -tz 2>/dev/null | \ - sed -n ' - s,\(-[^-]\+\)\{2\}/$,, - T - p - ' >> \ - "${tmp_dir}/${arch}" - done + if [ -n "${repo}" ]; then + for arch in 'i486' 'i686'; do + curl -Ss "${mirror}/${arch}/${repo}/${repo}.db.tar.gz" | \ + tar -tz 2>/dev/null | \ + sed -n ' + s,\(-[^-]\+\)\{2\}/$,, + T + p + ' >> \ + "${tmp_dir}/${arch}" + done + fi done { |