~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
376 by Steve Langasek
noble->oracular
12
for dist in platform.{trusty,xenial,bionic,focal,jammy,mantic,noble,oracular} \
13
            ubuntu.{trusty,xenial,bionic,focal,jammy,mantic,noble,oracular} \
14
            kubuntu.{trusty,xenial,bionic,focal,jammy,mantic,noble,oracular} \
15
            edubuntu.{mantic,noble,oracular} \
16
            xubuntu.{trusty,xenial,bionic,focal,jammy,mantic,noble,oracular} \
17
            i386.{focal,jammy,mantic,noble,oracular} \
18
            ubuntustudio.{trusty,xenial,bionic,focal,jammy,mantic,noble,oracular} \
19
            lubuntu.{trusty,xenial,bionic,focal,jammy,mantic,noble,oracular} \
230 by Steve Langasek
disable ubuntu-gnome trusty seed mirroring since this hasn't been moved to git
20
            ubuntu-gnome.xenial \
228 by Steve Langasek
drop artful from the list of releases we sync seeds for
21
            ubuntu-touch.{trusty,xenial} \
376 by Steve Langasek
noble->oracular
22
            ubuntukylin.{trusty,xenial,bionic,focal,jammy,mantic,noble,oracular} \
23
            ubuntucinnamon.{mantic,noble,oracular} \
24
            ubuntu-core.{xenial,bionic,focal,jammy,mantic,noble,oracular} \
25
            ubuntu-mate.{xenial,bionic,focal,jammy,mantic,noble,oracular} \
26
            ubuntu-budgie.{bionic,focal,jammy,mantic,noble,oracular} \
27
            ubuntu-unity.{mantic,noble,oracular}; 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
369 by Steve Langasek
Further refactor to reduce code duplication
39
		edubuntu.*|kubuntu.*|xubuntu.*|ubuntustudio.*|lubuntu.*|\
40
		ubuntu-gnome.*|ubuntu-mate.*|ubuntucinnamon.*)
41
			team=${dist%.*}-dev
86 by Colin Watson
update-germinate, update-one-germinate, update-seeds: add ubuntu-gnome
42
			;;
171 by Adam Conrad
update-seeds: Add ubuntukylin config from production
43
		ubuntukylin.*)
366 by Steve Langasek
Refactor to reduce code duplication now that all current flavors are in git
44
			team=ubuntukylin-members
171 by Adam Conrad
update-seeds: Add ubuntukylin config from production
45
			;;
203 by Colin Watson
update-seeds, update-germinate: add ubuntu-budgie
46
		ubuntu-budgie.*)
366 by Steve Langasek
Refactor to reduce code duplication now that all current flavors are in git
47
			team=ubuntubudgie-dev
203 by Colin Watson
update-seeds, update-germinate: add ubuntu-budgie
48
			;;
332 by Steve Langasek
Add ubuntu-unity to the list of seeds
49
		ubuntu-unity.*)
366 by Steve Langasek
Refactor to reduce code duplication now that all current flavors are in git
50
			team=unity7maintainers
332 by Steve Langasek
Add ubuntu-unity to the list of seeds
51
			;;
221 by Steve Langasek
ubuntu-touch seeds also git-only
52
		*)
366 by Steve Langasek
Refactor to reduce code duplication now that all current flavors are in git
53
			team=ubuntu-core-dev
233 by Steve Langasek
infer gitness from the URL instead of requiring a manual declaration
54
			;;
55
	esac
368 by Steve Langasek
Use correct syntax for team in URLs
56
	branch="https://git.launchpad.net/~$team/ubuntu-seeds/+git/${dist%.*}"
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
57
	if [ -d "$dist" ]; then
365 by Steve Langasek
update-seeds: drop bzr support
58
		git -C "$dist" pull -f >/dev/null 2>&1
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
59
	else
365 by Steve Langasek
update-seeds: drop bzr support
60
		git clone -b "$(echo $dist | sed 's/.*\.//')" "$branch" "$dist" >/dev/null 2>&1
1 by Ubuntu Archive
add update-germinate, update-one-germinate, and update-seeds
61
	fi
62
done