aboutsummaryrefslogtreecommitdiff
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
parente26ecf57e1671be10f7136e58783122c1b901ad5 (diff)
downloadpbuilder-fb8aaff420d292ec092b52cba657c72aa5d2dbe0.tar
pbuilder-fb8aaff420d292ec092b52cba657c72aa5d2dbe0.tar.gz
recursively ssearches up like debuild
-rw-r--r--debian/changelog3
-rw-r--r--pdebuild14
-rw-r--r--pdebuild.17
3 files changed, 12 insertions, 12 deletions
diff --git a/debian/changelog b/debian/changelog
index 81a43c2..3c7973d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,7 +1,8 @@
pbuilder (0.15) unstable; urgency=low
* Added a little more heuristics to pdebuild, so that it is nicer to use...
- It will search for ../debian directory, in addition to ./debian
+ It will search for ../debian directory, in addition to ./debian,
+ and also to recurse upwards.
* updated manpage for pdebuild.1
-- Junichi Uekawa <dancer@debian.org> Thu, 20 Dec 2001 15:28:44 +0900
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
diff --git a/pdebuild.1 b/pdebuild.1
index b41126e..98964c0 100644
--- a/pdebuild.1
+++ b/pdebuild.1
@@ -9,12 +9,9 @@ A convenience program for
.B pbuilder
which invokes pbuilder after obtaining appropriate root privilate
in a Debian source directory.
+One must be inside the source tree containing the
.B debian
-directory must either be visible on the current directory, when
-invoked.
-It also works when
-.B "../debian"
-exists.
+directory, in order to make it work.
.SH OPTIONS
.TP