File: debian-snapshot-importer.sh

package info (click to toggle)
rust-apt-swarm 0.5.1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,580 kB
  • sloc: makefile: 20; sh: 13
file content (15 lines) | stat: -rwxr-xr-x 546 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
set -u

curl -sSf 'https://snapshot.notset.fr/by-timestamp/debian.txt' | sort -r | \
while read -r snap; do
    for dist in bookworm bullseye buster sid unstable; do
        echo "[+] Importing $snap... ($dist)"
        base_url="https://snapshot.notset.fr/archive/debian/$snap/dists/$dist/"
        curl -sSf "$base_url/InRelease" | apt-swarm import
        apt-swarm plumbing attach-sig \
            <(curl -sSf "$base_url/Release") \
            <(curl -sSf "$base_url/Release.gpg") \
            | apt-swarm import
    done
done