From cd209730f560d38dc77e0dd9b2d940a2a7b3dd5e Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 19 Sep 2011 18:33:43 +0000 Subject: [PATCH] Allow usage with relative path to id-pbuild.sh The path to id-deb-build is made absolute before calling sudo. --- id-deb-build/id-pbuild.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/id-deb-build/id-pbuild.sh b/id-deb-build/id-pbuild.sh index 10b6578..fdb1442 100755 --- a/id-deb-build/id-pbuild.sh +++ b/id-deb-build/id-pbuild.sh @@ -58,13 +58,15 @@ if test "$do_help" = "yes"; then usage 1 1>&2 fi -PBUILDROOT=`dirname $0`/id-pbuild-root.sh +D0=`dirname $0` +ID_DEB_BUILD=`cd $D0; pwd` +PBUILDROOT=${ID_DEB_BUILD}/id-pbuild-root.sh if test ! -x $PBUILDROOT; then echo "$PBUILDROOT not found" exit 1 fi -MKDEBSRC=`dirname $0`/id-mk-deb-src.sh +MKDEBSRC=${ID_DEB_BUILD}/id-mk-deb-src.sh if test ! -x $MKDEBSRC; then echo "$MKDEBSRC not found" exit 1 @@ -108,7 +110,7 @@ echo "Debian distros: $DEBIAN_DIST" if test "${SUDO_USER}"; then echo "Running as sudo." echo "You can avoid it by adding the following in /etc/sudoers" - echo "${SUDO_USER} ALL=NOPASSWD: /home/${SUDO_USER}/proj/git-tools/id-deb-build/id-pbuild-root.sh" + echo "${SUDO_USER} ALL=NOPASSWD: ${ID_DEB_BUILD}/id-pbuild-root.sh" HOME_EXPORT=/home/${SUDO_USER} else HOME_EXPORT=$HOME -- 1.7.10.4