aboutsummaryrefslogtreecommitdiff
path: root/examples/gbp-cowbuilder-sid
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2009-03-05 21:07:49 +0100
committerGuido Günther <agx@sigxcpu.org>2009-03-05 21:07:49 +0100
commite56c9f52b10405d1f89d1f0cf79012164b70ffde (patch)
treecaba0811193e3e341be5d073b3e49abeabee454c /examples/gbp-cowbuilder-sid
parent94084b01cd5ea6c1c3de243654e9442f7d4991f4 (diff)
add git-builder cowbuilder example
Diffstat (limited to 'examples/gbp-cowbuilder-sid')
-rwxr-xr-xexamples/gbp-cowbuilder-sid37
1 files changed, 37 insertions, 0 deletions
diff --git a/examples/gbp-cowbuilder-sid b/examples/gbp-cowbuilder-sid
new file mode 100755
index 00000000..bcbf1483
--- /dev/null
+++ b/examples/gbp-cowbuilder-sid
@@ -0,0 +1,37 @@
+#!/bin/bash -e
+#
+# cowbuilder helper for git-buildpackage
+# use this as builder:
+# git-buildpackage --git-builder=gbp-cowbuilder-sid
+#
+# you can use this for other dists like sarge, etch, lenny with a symlink:
+# ln -s gbp-cowbuilder-sid gbp-cowbuilder-lenny
+#
+# and a /etc/pbuilder/pbuilderrc.$DIST
+
+DIST=${0/*gbp-cowbuilder-}
+ACTION=$1
+
+CONF=/etc/pbuilder/pbuilderrc.$DIST
+WA_OPT='--debian-etch-workaround'
+
+case $DIST in
+ sarge*|etch*)
+ echo "`basename $0`: Using $WA_OPT"
+ OPTS="$OPTS $WA_OPT"
+ ;;
+esac
+
+case $ACTION in
+ update|create|login)
+ sudo cowbuilder --$ACTION --configfile=${CONF} --dist $DIST
+ ;;
+ *)
+ # pass all options to dpkg-buildpackage:
+ pdebuild --configfile ${CONF} \
+ --pbuilder cowbuilder \
+ --debbuildopts "-i\.git/ -I.git $*" \
+ -- $OPTS
+ ;;
+esac
+