srmp/deb.fix.sh

25 lines
661 B
Bash
Raw Permalink Normal View History

2024-04-10 16:53:59 +00:00
#! /usr/bin/env bash
FILE="$(realpath "${BASH_SOURCE[0]}")"
ROOT="$(dirname "${FILE}")"
ERROR='→ ERROR! ERROR! ERROR! ←'
DISTS=(
2024-09-28 19:21:42 +00:00
'bookworm' 'bookworm-backports' 'bookworm-updates'
2024-04-10 16:53:59 +00:00
)
MISSING='Contents-all.gz'
SECTIONS=('main' 'non-free-firmware' 'contrib' 'non-free')
DEBIAN_ROOT='debian/dists'
LOCAL_ROOT="${ROOT}/root/deb/debian/${DEBIAN_ROOT}"
REMOTE_ROOT="https://deb.debian.org/${DEBIAN_ROOT}"
2024-09-28 19:21:42 +00:00
for dist in "${DISTS[@]}"; do
for section in "${SECTIONS[@]}"; do
2024-09-28 20:14:25 +00:00
cd "${LOCAL_ROOT}/${dist}/${section}" ||
echo "${ERROR}"
2024-09-28 19:14:04 +00:00
rm --force "${MISSING}"
2024-09-28 20:08:28 +00:00
wget "${REMOTE_ROOT}/${dist}/${section}/${MISSING}" &>/dev/null ||
2024-09-28 19:14:04 +00:00
echo "${ERROR}"
done
2024-04-10 16:53:59 +00:00
done