diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-05-24 19:06:22 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-05-24 19:06:22 +0100 |
commit | 14e03513c64b7aa4a583710b5a27945cd22c284b (patch) | |
tree | eb27ec667fd49c344f57bbdaf7185011cefac07e | |
parent | 3ef64f6d4215601bc324e51af9593b1ee481af12 (diff) | |
download | liw-automation-14e03513c64b7aa4a583710b5a27945cd22c284b.tar.gz |
Add pbuilder-create.
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | scripts/pbuilder-create | 38 |
2 files changed, 44 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 0febcdf..f284e2b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +liw-automation (8.14) UNRELEASED; urgency=low + + * Add pbuilder-create. + + -- Lars Wirzenius <liw@liw.fi> Tue, 24 May 2011 19:06:10 +0100 + liw-automation (8.13) squeeze; urgency=low * sd-publish-all: publish html as well diff --git a/scripts/pbuilder-create b/scripts/pbuilder-create new file mode 100755 index 0000000..86d5882 --- /dev/null +++ b/scripts/pbuilder-create @@ -0,0 +1,38 @@ +#!/bin/sh + +set -e + +MIRROR="http://eskarina.lan/debian" +ARCHES="amd64 i386" +RELEASES="squeeze sid" +if [ -e "$HOME/.pbuilder-create.conf" ] +then + . "$HOME/.pbuilder-create.conf" +fi + +for arch in $ARCHES +do + for release in $RELEASES + do + tgz="/var/cache/pbuilder/$release-$arch.tgz" + if [ ! -e "$tgz" ] + then + echo "Building $tgz" + if ! sudo pbuilder --create \ + --mirror "$MIRROR" \ + --othermirror "deb http://code.liw.fi/debian squeeze main" \ + --architecture "$arch" \ + --distribution "$release" \ + --basetgz "$tgz" \ + --logfile "$tgz.log" > /dev/null + then + echo "FAILED! Try again later." + sudo rm "$tgz" + fi + fi + done +done + +find /var/cache/pbuilder -maxdepth 1 -name '*.tgz' -mtime +2 | +sudo xargs -t -i'{}' -n1 pbuilder --update --basetgz '{}' --logfile '{}.log' \ + > /dev/null |