~ubuntu-archive/ubuntu-archive-scripts/trunk

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
238 by Adam Conrad
disco -> eoan
12
for dist in platform.{precise,trusty,xenial,bionic,cosmic,disco,eoan} \
13
            ubuntu.{precise,trusty,xenial,bionic,cosmic,disco,eoan} \
14
            kubuntu.{precise,trusty,xenial,bionic,cosmic,disco,eoan} \
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} \
238 by Adam Conrad
disco -> eoan
17
            xubuntu.{precise,trusty,xenial,bionic,cosmic,disco,eoan} \
199 by Adam Conrad
update-seeds: Clean up seed lists and add zesty
18
            netbook.precise \
228 by Steve Langasek
drop artful from the list of releases we sync seeds for
19
            mythbuntu.{precise,trusty,xenial} \
238 by Adam Conrad
disco -> eoan
20
            ubuntustudio.{precise,trusty,xenial,bionic,cosmic,disco,eoan} \
21
            lubuntu.{precise,trusty,xenial,bionic,cosmic,disco,eoan} \
230 by Steve Langasek
disable ubuntu-gnome trusty seed mirroring since this hasn't been moved to git
22
            ubuntu-gnome.xenial \
228 by Steve Langasek
drop artful from the list of releases we sync seeds for
23
            ubuntu-touch.{trusty,xenial} \
238 by Adam Conrad
disco -> eoan
24
            ubuntukylin.{trusty,xenial,bionic,cosmic,disco,eoan} \
25
            ubuntu-core.{xenial,bionic,cosmic,disco,eoan} \
26
            ubuntu-mate.{xenial,bionic,cosmic,disco,eoan} \
27
            ubuntu-budgie.{bionic,cosmic,disco,eoan}; do
85 by Colin Watson
update-seeds: allow command-line limiting to a single series
28
	if [ "$ONLY_SERIES" ]; then
29
		case $dist in
30
			*.$ONLY_SERIES)
31
				;;
32
			*)
33
				continue
34
				;;
35
		esac
36
	fi
37
15 by Ubuntu Archive
improve handling of changed branch locations
38
	case $dist in
149 by Colin Watson
update-seeds: add kubuntu-plasma5.utopic
39
		kubuntu.*|kubuntu-active.*|kubuntu-plasma5.*)
15 by Ubuntu Archive
improve handling of changed branch locations
40
			branch="http://bazaar.launchpad.net/~kubuntu-dev/ubuntu-seeds/$dist"
41
			;;
42
		xubuntu.*)
215.1.1 by Sean Davis
Use git for xubuntu seeds going forward
43
			branch="https://git.launchpad.net/~xubuntu-dev/ubuntu-seeds/+git/xubuntu"
15 by Ubuntu Archive
improve handling of changed branch locations
44
			;;
45
		mythbuntu.*)
46
			branch="http://bazaar.launchpad.net/~mythbuntu-dev/ubuntu-seeds/$dist"
47
			;;
48
		ubuntustudio.*)
231.1.1 by Ross Gammon
Ubuntu Studio seeds coverted to git
49
			branch="https://git.launchpad.net/~ubuntustudio-dev/ubuntu-seeds/+git/ubuntustudio"
15 by Ubuntu Archive
improve handling of changed branch locations
50
			;;
17 by Ubuntu Archive
add Lubuntu
51
		lubuntu.*)
209.1.1 by Simon Quigley
Add Git support for seeds, and convert Lubuntu's seed over to Git.
52
			branch="https://git.launchpad.net/~lubuntu-dev/ubuntu-seeds/+git/lubuntu"
17 by Ubuntu Archive
add Lubuntu
53
			;;
86 by Colin Watson
update-germinate, update-one-germinate, update-seeds: add ubuntu-gnome
54
		ubuntu-gnome.*)
229 by Steve Langasek
update ubuntu-gnome to pull seeds from git
55
			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
56
			;;
171 by Adam Conrad
update-seeds: Add ubuntukylin config from production
57
		ubuntukylin.*)
216.1.1 by handsome_feng
Add Git support for seeds and convert ubuntukylin's seed over to Git
58
			branch="https://git.launchpad.net/~ubuntukylin-members/ubuntu-seeds/+git/ubuntukylin"
171 by Adam Conrad
update-seeds: Add ubuntukylin config from production
59
			;;
159 by Colin Watson
update-seeds, update-germinate: add ubuntu-mate
60
		ubuntu-mate.*)
61
			branch="http://bazaar.launchpad.net/~ubuntu-mate-dev/ubuntu-seeds/$dist"
62
			;;
203 by Colin Watson
update-seeds, update-germinate: add ubuntu-budgie
63
		ubuntu-budgie.*)
64
			branch="http://bazaar.launchpad.net/~ubuntubudgie-dev/ubuntu-seeds/$dist"
65
			;;
221 by Steve Langasek
ubuntu-touch seeds also git-only
66
		*)
220 by Steve Langasek
fix update-seeds for ubuntu-core-dev git branches
67
			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
68
			;;
69
	esac
70
	case $branch in
71
		*bazaar*)
72
			git=
73
			;;
74
		*)
75
			git=yes
215 by Steve Langasek
use git for ubuntu seeds going forward
76
			;;
15 by Ubuntu Archive
improve handling of changed branch locations
77
	esac
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
78
	if [ -d "$dist" ]; then
209.1.1 by Simon Quigley
Add Git support for seeds, and convert Lubuntu's seed over to Git.
79
		if [ -n "$git" ]; then
80
			git -C "$dist" pull -f >/dev/null 2>&1
81
		else
82
			bzr pull -d "$dist" --overwrite --remember "$branch" >/dev/null 2>&1
83
		fi
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
84
	else
209.1.1 by Simon Quigley
Add Git support for seeds, and convert Lubuntu's seed over to Git.
85
		if [ -n "$git" ]; then
86
			git clone -b "$(echo $dist | sed 's/.*\.//')" "$branch" "$dist" >/dev/null 2>&1
87
		else
88
			bzr branch "$branch" >/dev/null 2>&1
89
		fi
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
90
	fi
91
done