aboutsummaryrefslogtreecommitdiff
path: root/pdebuild
diff options
context:
space:
mode:
authordancer <dancer>2001-12-20 11:09:19 +0000
committerdancer <dancer>2001-12-20 11:09:19 +0000
commitfb8aaff420d292ec092b52cba657c72aa5d2dbe0 (patch)
tree1fbb8739d9d187576f5a38d14e63f65f5a6dbe39 /pdebuild
parente26ecf57e1671be10f7136e58783122c1b901ad5 (diff)
downloadpbuilder-fb8aaff420d292ec092b52cba657c72aa5d2dbe0.tar
pbuilder-fb8aaff420d292ec092b52cba657c72aa5d2dbe0.tar.gz
recursively ssearches up like debuild
Diffstat (limited to 'pdebuild')
-rw-r--r--pdebuild14
1 files changed, 8 insertions, 6 deletions
diff --git a/pdebuild b/pdebuild
index bc38aae..a8ece8c 100644
--- a/pdebuild
+++ b/pdebuild
@@ -1,13 +1,15 @@
#! /bin/bash
set -e
-if ! test -d ./debian ; then
- if test -d ../debian; then
- cd ..;
- else
- echo "This is (probably) not a Debian source package directory."
- fi
+while ! test -d ./debian -o "$(pwd)" = "/" ; do
+ cd ..;
+done
+
+if test ! -d ./debian; then
+ echo "Cannot find ./debian dir"
+ exit 1
fi;
+
. /usr/lib/pbuilder/pbuilder-checkparams
$BUILDSOURCEROOTCMD dpkg-buildpackage -S -us -uc || true
$PBUILDERROOTCMD pbuilder build "$@" ../$(dpkg-parsechangelog|sed -n 's/^Source: //p')_$(dpkg-parsechangelog|sed -n 's/^Version: \(.*:\|\)//p').dsc