#!/bin/sh
-if [ -z "$1" ]; then
- echo "Usage: $0 <dist>"
+if [ -z "$1" ] || [ -z "$2" ]; then
+ echo "Usage: $0 <dist> <arch> [<branch>]"
exit 1
fi
DIST=$1
+ARCH=$2
+
+if [ -z "$3" ]; then
+ DEBIAN_BRANCH=debian/latest
+else
+ DEBIAN_BRANCH=$3
+fi
gbp buildpackage \
--git-submodules \
---git-debian-branch="debian/latest" \
+--git-debian-branch="$DEBIAN_BRANCH" \
--git-pbuilder \
---git-arch=amd64 \
+--git-arch="$ARCH" \
--git-dist="$DIST" \
---git-pbuilder-options="--buildresult $HOME/qa/git/argeo-qa-unstable/build/repo/deb/$DIST/ml/1.1 --aptcache /var/cache/pbuilder/aptcache"
+--git-pbuilder-options="--aptcache /var/cache/pbuilder/aptcache --buildresult $HOME/qa/git/argeo-qa-unstable/build/repo/deb/$DIST/ml/1.1"
--- /dev/null
+#!/bin/sh
+
+if [ -z "$1" ] || [ -z "$2" ]; then
+ echo "Usage: $0 <dist> <arch>"
+ exit 1
+fi
+
+export DIST=$1
+export ARCH=$2
+
+sudo rm -rf "/var/cache/pbuilder/base-$DIST-$ARCH.cow"
+GIT_PBUILDER_OPTIONS="--aptcache /var/cache/pbuilder/aptcache --components 'main contrib non-free' --othermirror 'deb [trusted=yes] file:/home/mbaudier/qa/git/argeo-qa-unstable/build/repo/deb/$1/ml/1.1/ ./'" git-pbuilder create
exit 1
fi
-DIST=$1 ARCH=$2 GIT_PBUILDER_OPTIONS="--othermirror 'deb [trusted=yes] file:/home/mbaudier/qa/git/argeo-qa-unstable/build/repo/deb/$1/ml/1.1/ ./'" git-pbuilder create
+export DIST=$1
+export ARCH=$2
+
+sudo rm -rf "/var/cache/pbuilder/base-$DIST-$ARCH.cow"
+GIT_PBUILDER_OPTIONS="--aptcache /var/cache/pbuilder/aptcache --othermirror 'deb [trusted=yes] file:/home/mbaudier/qa/git/argeo-qa-unstable/build/repo/deb/$1/ml/1.1/ ./'" git-pbuilder create