#!/bin/bash bootstrap_mirror='https://archlinux32.andreasbaumann.cc/bootstrap/i486' bootstrap_prefix='bootstrap-' mirror='https://mirror.archlinux32.org/i486' tmp_dir=$(mktemp -d) trap 'rm -rf --one-file-system "${tmp_dir}"' EXIT for repo in \ 'core' \ 'extra' \ 'community' \ 'testing' \ 'community-testing' \ 'staging' \ 'community-staging'; do curl -Ss "${bootstrap_mirror}/${repo}/${bootstrap_prefix}${repo}.db.tar.gz" | \ tar -tz 2>/dev/null | \ sed -n ' s,\(-[^-]\+\)\{2\}/$,, T p ' >> \ "${tmp_dir}/bootstrap" curl -Ss "${mirror}/${repo}/${repo}.db.tar.gz" | \ tar -tz 2>/dev/null | \ sed -n ' s,\(-[^-]\+\)\{2\}/$,, T p ' >> \ "${tmp_dir}/mirror" done { sort -u "${tmp_dir}/bootstrap" sort -u "${tmp_dir}/mirror" } | \ sort | \ uniq -d