From 80174ad842ddcdef900fc00aa2b717ab818b61cc Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 17 Oct 2018 10:58:31 +0200 Subject: find-bootstrap-duplicates: also check [bootstrap] --- find-bootstrap-duplicates | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'find-bootstrap-duplicates') 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 { -- cgit v1.2.3