diff options
Diffstat (limited to 'find-bootstrap-duplicates')
-rwxr-xr-x | find-bootstrap-duplicates | 29 |
1 files changed, 16 insertions, 13 deletions
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 { |