~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
334 by Colin Watson
kinetic → lunar
12
for dist in platform.{trusty,xenial,bionic,focal,jammy,kinetic,lunar} \
13
            ubuntu.{trusty,xenial,bionic,focal,jammy,kinetic,lunar} \
14
            kubuntu.{trusty,xenial,bionic,focal,jammy,kinetic,lunar} \
314 by Steve Langasek
Drop references to obsolete series (precise, disco)
15
            kubuntu-active.trusty \
335 by Steve Langasek
Generate output for edubuntu in lunar, now from new seed repo
16
            edubuntu.lunar \
334 by Colin Watson
kinetic → lunar
17
            xubuntu.{trusty,xenial,bionic,focal,jammy,kinetic,lunar} \
18
            i386.{focal,jammy,kinetic,lunar} \
314 by Steve Langasek
Drop references to obsolete series (precise, disco)
19
            mythbuntu.{trusty,xenial} \
334 by Colin Watson
kinetic → lunar
20
            ubuntustudio.{trusty,xenial,bionic,focal,jammy,kinetic,lunar} \
21
            lubuntu.{trusty,xenial,bionic,focal,jammy,kinetic,lunar} \
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} \
334 by Colin Watson
kinetic → lunar
24
            ubuntukylin.{trusty,xenial,bionic,focal,jammy,kinetic,lunar} \
337 by Łukasz 'sil2100' Zemczak
The name of the cinnamon flavor is ubuntucinnamon, not ubuntu-cinnamon.
25
            ubuntucinnamon.lunar \
334 by Colin Watson
kinetic → lunar
26
            ubuntu-core.{xenial,bionic,focal,jammy,kinetic,lunar} \
27
            ubuntu-mate.{xenial,bionic,focal,jammy,kinetic,lunar} \
28
            ubuntu-budgie.{bionic,focal,jammy,kinetic,lunar} \
29
            ubuntu-unity.{kinetic,lunar}; do
85 by Colin Watson
update-seeds: allow command-line limiting to a single series
30
	if [ "$ONLY_SERIES" ]; then
31
		case $dist in
32
			*.$ONLY_SERIES)
33
				;;
34
			*)
35
				continue
36
				;;
37
		esac
38
	fi
39
15 by Ubuntu Archive
improve handling of changed branch locations
40
	case $dist in
335 by Steve Langasek
Generate output for edubuntu in lunar, now from new seed repo
41
		edubuntu.*)
42
			branch="https://git.launchpad.net/~edubuntu-dev/ubuntu-seeds/+git/edubuntu"
43
			;;
326 by Steve Langasek
kubuntu seeds moved to git
44
		kubuntu.*)
328 by Steve Langasek
Fix seed base for kubuntu
45
			branch="https://git.launchpad.net/~kubuntu-dev/ubuntu-seeds/+git/kubuntu"
326 by Steve Langasek
kubuntu seeds moved to git
46
			;;
327 by Steve Langasek
Drop reference to kubuntu-plasma5, not in any supported release
47
		kubuntu-active.*)
15 by Ubuntu Archive
improve handling of changed branch locations
48
			branch="http://bazaar.launchpad.net/~kubuntu-dev/ubuntu-seeds/$dist"
49
			;;
50
		xubuntu.*)
215.1.1 by Sean Davis
Use git for xubuntu seeds going forward
51
			branch="https://git.launchpad.net/~xubuntu-dev/ubuntu-seeds/+git/xubuntu"
15 by Ubuntu Archive
improve handling of changed branch locations
52
			;;
53
		mythbuntu.*)
54
			branch="http://bazaar.launchpad.net/~mythbuntu-dev/ubuntu-seeds/$dist"
55
			;;
56
		ubuntustudio.*)
231.1.1 by Ross Gammon
Ubuntu Studio seeds coverted to git
57
			branch="https://git.launchpad.net/~ubuntustudio-dev/ubuntu-seeds/+git/ubuntustudio"
15 by Ubuntu Archive
improve handling of changed branch locations
58
			;;
17 by Ubuntu Archive
add Lubuntu
59
		lubuntu.*)
209.1.1 by Simon Quigley
Add Git support for seeds, and convert Lubuntu's seed over to Git.
60
			branch="https://git.launchpad.net/~lubuntu-dev/ubuntu-seeds/+git/lubuntu"
17 by Ubuntu Archive
add Lubuntu
61
			;;
86 by Colin Watson
update-germinate, update-one-germinate, update-seeds: add ubuntu-gnome
62
		ubuntu-gnome.*)
229 by Steve Langasek
update ubuntu-gnome to pull seeds from git
63
			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
64
			;;
171 by Adam Conrad
update-seeds: Add ubuntukylin config from production
65
		ubuntukylin.*)
216.1.1 by handsome_feng
Add Git support for seeds and convert ubuntukylin's seed over to Git
66
			branch="https://git.launchpad.net/~ubuntukylin-members/ubuntu-seeds/+git/ubuntukylin"
171 by Adam Conrad
update-seeds: Add ubuntukylin config from production
67
			;;
159 by Colin Watson
update-seeds, update-germinate: add ubuntu-mate
68
		ubuntu-mate.*)
69
			branch="http://bazaar.launchpad.net/~ubuntu-mate-dev/ubuntu-seeds/$dist"
70
			;;
203 by Colin Watson
update-seeds, update-germinate: add ubuntu-budgie
71
		ubuntu-budgie.*)
72
			branch="http://bazaar.launchpad.net/~ubuntubudgie-dev/ubuntu-seeds/$dist"
73
			;;
337 by Łukasz 'sil2100' Zemczak
The name of the cinnamon flavor is ubuntucinnamon, not ubuntu-cinnamon.
74
		ubuntucinnamon.*)
339 by Steve Langasek
git.launchpad.net, not code.launchpad.net
75
			branch="https://git.launchpad.net/~ubuntucinnamon-dev/ubuntu-seeds/+git/ubuntucinnamon"
336 by Steve Langasek
Add ubuntu-cinnamon to seeds, germinate output
76
			;;
332 by Steve Langasek
Add ubuntu-unity to the list of seeds
77
		ubuntu-unity.*)
78
			branch="https://git.launchpad.net/~unity7maintainers/ubuntu-seeds/+git/ubuntu-unity"
79
			;;
221 by Steve Langasek
ubuntu-touch seeds also git-only
80
		*)
220 by Steve Langasek
fix update-seeds for ubuntu-core-dev git branches
81
			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
82
			;;
83
	esac
84
	case $branch in
85
		*bazaar*)
86
			git=
87
			;;
88
		*)
89
			git=yes
215 by Steve Langasek
use git for ubuntu seeds going forward
90
			;;
15 by Ubuntu Archive
improve handling of changed branch locations
91
	esac
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
92
	if [ -d "$dist" ]; then
209.1.1 by Simon Quigley
Add Git support for seeds, and convert Lubuntu's seed over to Git.
93
		if [ -n "$git" ]; then
94
			git -C "$dist" pull -f >/dev/null 2>&1
95
		else
96
			bzr pull -d "$dist" --overwrite --remember "$branch" >/dev/null 2>&1
97
		fi
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
98
	else
209.1.1 by Simon Quigley
Add Git support for seeds, and convert Lubuntu's seed over to Git.
99
		if [ -n "$git" ]; then
100
			git clone -b "$(echo $dist | sed 's/.*\.//')" "$branch" "$dist" >/dev/null 2>&1
101
		else
102
			bzr branch "$branch" >/dev/null 2>&1
103
		fi
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
104
	fi
105
done