~costamagnagianfranco/ubuntu-archive-tools/sync

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
set -e

DIST="$1"

if [ -z "$DIST" ]; then
	echo "Usage: $0 DIST"
	exit 1
fi
wget -O - -q \
	https://people.canonical.com/~ubuntu-archive/proposed-migration/"$DIST"/update_output.txt \
| sed -e'1,/Removing packages left in testing/d; /^[^[:space:]]/,$d; s/^[[:space:]]*//; s/:.*//' \
| grep -E '^linux|-di$' \
| while read pkgs; do
	remove-package -b -s "$DIST"-updates -m NBS -y $pkgs || true
	remove-package -b -s "$DIST"-security -m NBS -y $pkgs || true
done