2011-01-05 20:40:55 +00:00
|
|
|
#!/bin/sh -x
|
2010-07-29 18:32:19 +00:00
|
|
|
|
2010-08-11 17:46:31 +00:00
|
|
|
basedir=~/debian-base
|
2011-01-08 23:41:20 +00:00
|
|
|
dists=$1
|
2010-08-11 17:46:31 +00:00
|
|
|
|
2011-01-08 23:41:20 +00:00
|
|
|
[ -z "$dists" ] && dists="sid squeeze lenny maverick lucid"
|
2011-01-05 20:40:55 +00:00
|
|
|
|
2011-01-08 23:41:20 +00:00
|
|
|
for dist in $dists
|
|
|
|
do
|
|
|
|
os="debian"
|
|
|
|
[ "$dist" == "maverick" ] && os="ubuntu"
|
|
|
|
[ "$dist" == "lucid" ] && os="ubuntu"
|
2010-07-29 18:32:19 +00:00
|
|
|
|
2011-01-08 23:41:20 +00:00
|
|
|
if [ $os = "debian" ]; then
|
|
|
|
mirror="http://http.us.debian.org/debian"
|
|
|
|
othermirror=""
|
|
|
|
else
|
|
|
|
mirror=""
|
|
|
|
othermirror="deb http://archive.ubuntu.com/ubuntu $dist main restricted universe multiverse"
|
|
|
|
fi
|
|
|
|
|
|
|
|
pbuilder --clean
|
|
|
|
|
|
|
|
if [ -e $basedir/$dist.tgz ]; then
|
|
|
|
echo updating $dist base.tgz
|
|
|
|
savelog -l -n $basedir/$dist.tgz
|
|
|
|
cp $basedir/$dist.tgz.0 $basedir/$dist.tgz
|
|
|
|
pbuilder update --basetgz $basedir/$dist.tgz --distribution $dist #--mirror "$mirror" --othermirror "$othermirror"
|
|
|
|
else
|
|
|
|
echo building $dist base.tgz
|
|
|
|
pbuilder create --basetgz $basedir/$dist.tgz --distribution $dist --mirror "$mirror" --othermirror "$othermirror"
|
|
|
|
fi
|
|
|
|
done
|