~brian-murray/ubuntu-archive-scripts/remove-vintage-packages

201 by Adam Conrad
update-seeds: sh -> bash to support expansion syntax
1
#! /bin/bash
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
2
set -e
85 by Colin Watson
update-seeds: allow command-line limiting to a single series
3
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
4
cd ~/public_html/seeds
5
if ! lockfile -r2 .update.lock; then
6
	exit 1
7
fi
8
trap 'rm -f .update.lock' EXIT HUP INT QUIT TERM
85 by Colin Watson
update-seeds: allow command-line limiting to a single series
9
10
ONLY_SERIES="$1"
11
300 by Łukasz 'sil2100' Zemczak
groovy -> hirsute
12
for dist in platform.{precise,trusty,xenial,bionic,focal,groovy,hirsute} \
13
            ubuntu.{precise,trusty,xenial,bionic,focal,groovy,hirsute} \
14
            kubuntu.{precise,trusty,xenial,bionic,focal,groovy,hirsute} \
207 by Adam Conrad
Stop germinating for vivid for all but ubuntu and ubuntu-touch
15
            kubuntu-active.{precise,trusty} \
228 by Steve Langasek
drop artful from the list of releases we sync seeds for
16
            edubuntu.{precise,trusty,xenial} \
300 by Łukasz 'sil2100' Zemczak
groovy -> hirsute
17
            xubuntu.{precise,trusty,xenial,bionic,focal,groovy,hirsute} \
18
            i386.{focal,groovy,hirsute} \
199 by Adam Conrad
update-seeds: Clean up seed lists and add zesty
19
            netbook.precise \
228 by Steve Langasek
drop artful from the list of releases we sync seeds for
20
            mythbuntu.{precise,trusty,xenial} \
300 by Łukasz 'sil2100' Zemczak
groovy -> hirsute
21
            ubuntustudio.{precise,trusty,xenial,bionic,focal,groovy,hirsute} \
22
            lubuntu.{precise,trusty,xenial,bionic,focal,groovy,hirsute} \
230 by Steve Langasek
disable ubuntu-gnome trusty seed mirroring since this hasn't been moved to git
23
            ubuntu-gnome.xenial \
228 by Steve Langasek
drop artful from the list of releases we sync seeds for
24
            ubuntu-touch.{trusty,xenial} \
300 by Łukasz 'sil2100' Zemczak
groovy -> hirsute
25
            ubuntukylin.{trusty,xenial,bionic,focal,groovy,hirsute} \
26
            ubuntu-core.{xenial,bionic,focal,groovy,hirsute} \
27
            ubuntu-mate.{xenial,bionic,focal,groovy,hirsute} \
28
            ubuntu-budgie.{bionic,focal,groovy,hirsute}; do
85 by Colin Watson
update-seeds: allow command-line limiting to a single series
29
	if [ "$ONLY_SERIES" ]; then
30
		case $dist in
31
			*.$ONLY_SERIES)
32
				;;
33
			*)
34
				continue
35
				;;
36
		esac
37
	fi
38
15 by Ubuntu Archive
improve handling of changed branch locations
39
	case $dist in
149 by Colin Watson
update-seeds: add kubuntu-plasma5.utopic
40
		kubuntu.*|kubuntu-active.*|kubuntu-plasma5.*)
15 by Ubuntu Archive
improve handling of changed branch locations
41
			branch="http://bazaar.launchpad.net/~kubuntu-dev/ubuntu-seeds/$dist"
42
			;;
43
		xubuntu.*)
215.1.1 by Sean Davis
Use git for xubuntu seeds going forward
44
			branch="https://git.launchpad.net/~xubuntu-dev/ubuntu-seeds/+git/xubuntu"
15 by Ubuntu Archive
improve handling of changed branch locations
45
			;;
46
		mythbuntu.*)
47
			branch="http://bazaar.launchpad.net/~mythbuntu-dev/ubuntu-seeds/$dist"
48
			;;
49
		ubuntustudio.*)
231.1.1 by Ross Gammon
Ubuntu Studio seeds coverted to git
50
			branch="https://git.launchpad.net/~ubuntustudio-dev/ubuntu-seeds/+git/ubuntustudio"
15 by Ubuntu Archive
improve handling of changed branch locations
51
			;;
17 by Ubuntu Archive
add Lubuntu
52
		lubuntu.*)
209.1.1 by Simon Quigley
Add Git support for seeds, and convert Lubuntu's seed over to Git.
53
			branch="https://git.launchpad.net/~lubuntu-dev/ubuntu-seeds/+git/lubuntu"
17 by Ubuntu Archive
add Lubuntu
54
			;;
86 by Colin Watson
update-germinate, update-one-germinate, update-seeds: add ubuntu-gnome
55
		ubuntu-gnome.*)
229 by Steve Langasek
update ubuntu-gnome to pull seeds from git
56
			branch="https://git.launchpad.net/~ubuntu-gnome-dev/ubuntu-seeds/+git/ubuntu-gnome"
86 by Colin Watson
update-germinate, update-one-germinate, update-seeds: add ubuntu-gnome
57
			;;
171 by Adam Conrad
update-seeds: Add ubuntukylin config from production
58
		ubuntukylin.*)
216.1.1 by handsome_feng
Add Git support for seeds and convert ubuntukylin's seed over to Git
59
			branch="https://git.launchpad.net/~ubuntukylin-members/ubuntu-seeds/+git/ubuntukylin"
171 by Adam Conrad
update-seeds: Add ubuntukylin config from production
60
			;;
159 by Colin Watson
update-seeds, update-germinate: add ubuntu-mate
61
		ubuntu-mate.*)
62
			branch="http://bazaar.launchpad.net/~ubuntu-mate-dev/ubuntu-seeds/$dist"
63
			;;
203 by Colin Watson
update-seeds, update-germinate: add ubuntu-budgie
64
		ubuntu-budgie.*)
65
			branch="http://bazaar.launchpad.net/~ubuntubudgie-dev/ubuntu-seeds/$dist"
66
			;;
221 by Steve Langasek
ubuntu-touch seeds also git-only
67
		*)
220 by Steve Langasek
fix update-seeds for ubuntu-core-dev git branches
68
			branch="https://git.launchpad.net/~ubuntu-core-dev/ubuntu-seeds/+git/${dist%.*}"
233 by Steve Langasek
infer gitness from the URL instead of requiring a manual declaration
69
			;;
70
	esac
71
	case $branch in
72
		*bazaar*)
73
			git=
74
			;;
75
		*)
76
			git=yes
215 by Steve Langasek
use git for ubuntu seeds going forward
77
			;;
15 by Ubuntu Archive
improve handling of changed branch locations
78
	esac
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
79
	if [ -d "$dist" ]; then
209.1.1 by Simon Quigley
Add Git support for seeds, and convert Lubuntu's seed over to Git.
80
		if [ -n "$git" ]; then
81
			git -C "$dist" pull -f >/dev/null 2>&1
82
		else
83
			bzr pull -d "$dist" --overwrite --remember "$branch" >/dev/null 2>&1
84
		fi
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
85
	else
209.1.1 by Simon Quigley
Add Git support for seeds, and convert Lubuntu's seed over to Git.
86
		if [ -n "$git" ]; then
87
			git clone -b "$(echo $dist | sed 's/.*\.//')" "$branch" "$dist" >/dev/null 2>&1
88
		else
89
			bzr branch "$branch" >/dev/null 2>&1
90
		fi
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
91
	fi
92
done