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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/sh

if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
	echo "Usage: $0 NAME DIST COMPONENTS" >&2
	exit 1
fi

NAME="$1"
DIST="$2"
COMPONENTS="$3"

SEED_SOURCE="file://$HOME/public_html/seeds/"

rm -rf "$HOME/public_html/germinate-output/$NAME.new"
mkdir -p "$HOME/public_html/germinate-output/$NAME.new"
cd "$HOME/public_html/germinate-output/$NAME.new"
python "$HOME/germinate/bin/germinate" $GERMINATE_OPTIONS ${SEED_SOURCE:+-S "$SEED_SOURCE"} -m file:///home/ubuntu-archive/mirror/ubuntu -s "$NAME" -d "$DIST" ${COMPONENTS:+-c "$COMPONENTS"} > _germinate_output
cd ..
rm -rf "$NAME.old"
[ -e "$NAME" ] && mv "$NAME" "$NAME.old"
mv "$NAME.new" "$NAME"
rm -rf "$NAME.old"