From fb8aaff420d292ec092b52cba657c72aa5d2dbe0 Mon Sep 17 00:00:00 2001 From: dancer Date: Thu, 20 Dec 2001 11:09:19 +0000 Subject: recursively ssearches up like debuild --- pdebuild | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'pdebuild') 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 -- cgit v1.2.3