summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2008-01-13 20:26:01 +0000
committerJonas Smedegaard <dr@jones.dk>2008-01-13 20:26:01 +0000
commitc452004aa2754affd7aad862dcad80b91f732c8f (patch)
treeffada92fc63b28b60e23a3de3bd33c430a862655
parent9aebf20050d03221d08e8a431ca34be44a404a01 (diff)
Major rewrite: Actually works now.
-rwxr-xr-xlocalgitcowdebuild39
-rwxr-xr-xlocalgitdebuild47
-rwxr-xr-xlocalgitpdebuild32
3 files changed, 74 insertions, 44 deletions
diff --git a/localgitcowdebuild b/localgitcowdebuild
index cda124c..8fef0fb 100755
--- a/localgitcowdebuild
+++ b/localgitcowdebuild
@@ -2,10 +2,14 @@
set -e
+PRG=$(basename "$0")
+
function showhelp() {
- echo "Usage: $(basename $0) POOL [debbuildopts] [-- pbuilderopts]"
- echo ""
- echo "Example: $(basename $0) sarge_with_hacks -B"
+ cat <<EOF
+Usage: $PRG POOL [debbuildopts] [git-buildpackage opts] [-- pbuilderopts]
+
+Example: $PRG --git-sign-tags sarge_with_hacks -B
+EOF
}
if [ $# -eq 0 ]; then
@@ -14,7 +18,7 @@ if [ $# -eq 0 ]; then
fi
pools=''
-pdebuildopts=''
+gitopts=''
debbuildopts=''
while [ $# -gt 0 ]; do
case $1 in
@@ -26,6 +30,10 @@ while [ $# -gt 0 ]; do
shift
break
;;
+ --git-*)
+ gitopts="$gitopts $1"
+ shift
+ ;;
--*)
echo "ERROR: Unknown argument \"$1\"!" &>2
showhelp
@@ -42,22 +50,7 @@ while [ $# -gt 0 ]; do
esac
done
-for pool in $pools; do
- basepath="/var/cache/pbuilder/cow-$pool"
- buildplace="/var/cache/pbuilder/build-$pool"
- aptcache="/var/cache/pbuilder/aptcache-$pool/"
- hookdir="/var/cache/pbuilder/hooks-$pool/"
- buildresult="$HOME/src/pbuild-$pool/"
- pdebuild \
- --pbuilder cowbuilder \
- --buildresult "$buildresult" \
- --debbuildopts "-i\.git/ -I.git $debbuildopts" \
- $pdebuildopts \
- -- \
- --basepath "$basepath" \
- --buildplace "$buildplace" \
- --aptcache "$aptcache" \
- --hookdir "$hookdir" \
- --pkgname-logfile \
- $@
-done
+git-buildpackage \
+ --git-builder="localcowdebuild -i\.git/ -I.git $debbuildopts $pools $@" \
+ --git-cleaner="fakeroot debian/rules clean" \
+ $gitopts
diff --git a/localgitdebuild b/localgitdebuild
index 983fe3d..d335be6 100755
--- a/localgitdebuild
+++ b/localgitdebuild
@@ -2,8 +2,45 @@
set -e
-debuild \
- --set-envvar=CCACHE_DIR="/var/cache/pbuilder/ccache" \
- --set-envvar=PATH="/var/cache/pbuilder/bin:/usr/lib/ccache:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11" \
- -i\.git/ -I.git \
- "$@"
+PRG=$(basename "$0")
+
+function showhelp() {
+ cat <<EOF
+Usage: $PRG [git-buildpackage opts] [-- debuild opts]
+
+Example: $PRG --git-sign-tags
+EOF
+}
+
+if [ $# -eq 0 ]; then
+ showhelp
+ exit 1
+fi
+
+gitopts=''
+while [ $# -gt 0 ]; do
+ case $1 in
+ -h|--help)
+ showhelp
+ exit 0
+ ;;
+ --)
+ shift
+ break
+ ;;
+ --git-*)
+ gitopts="$gitopts $1"
+ shift
+ ;;
+ *)
+ echo "ERROR: Unknown argument \"$1\"!" &>2
+ showhelp
+ exit 1
+ ;;
+ esac
+done
+
+git-buildpackage \
+ --git-builder="localdebuild -i\.git/ -I.git $@" \
+ --git-cleaner="fakeroot debian/rules clean" \
+ $gitopts
diff --git a/localgitpdebuild b/localgitpdebuild
index 0154854..4aba8f9 100755
--- a/localgitpdebuild
+++ b/localgitpdebuild
@@ -2,10 +2,14 @@
set -e
+PRG=$(basename "$0")
+
function showhelp() {
- echo "Usage: $(basename $0) POOL [debbuildopts] [-- pbuilderopts]"
- echo ""
- echo "Example: $(basename $0) sarge_with_hacks -B"
+ echo <<EOF
+Usage: $PRG POOL [debbuildopts] [-- pbuilderopts]
+
+Example: $PRG sarge_with_hacks -B
+EOF
}
if [ $# -eq 0 ]; then
@@ -14,7 +18,7 @@ if [ $# -eq 0 ]; then
fi
pools=''
-pdebuildopts=''
+gitopts=''
debbuildopts=''
while [ $# -gt 0 ]; do
case $1 in
@@ -26,6 +30,10 @@ while [ $# -gt 0 ]; do
shift
break
;;
+ --git-*)
+ gitopts="$gitopts $1"
+ shift
+ ;;
--*)
echo "ERROR: Unknown argument \"$1\"!" &>2
showhelp
@@ -42,15 +50,7 @@ while [ $# -gt 0 ]; do
esac
done
-for pool in $pools; do
- pdebuild \
- --buildresult $HOME/src/pbuild-$pool/ \
- --debbuildopts "-i\.git/ -I.git $debbuildopts" \
- $pdebuildopts \
- -- \
- --basetgz /var/cache/pbuilder/base-$pool.tgz \
- --buildplace /var/cache/pbuilder/build-$pool/ \
- --aptcache /var/cache/pbuilder/aptcache-$pool/ \
- --pkgname-logfile \
- $@
-done
+git-buildpackage \
+ --git-builder="localpdebuild -i\.git/ -I.git $debbuildopts $pools $@" \
+ --git-cleaner="fakeroot debian/rules clean" \
+ $gitopts