From: Adam Dickmeiss Date: Mon, 17 Oct 2011 08:44:48 +0000 (+0200) Subject: id-pbuild.sh: call mk-deb-src when running as normal user X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=a175f99f6116f96faa57ad1cd4a5bcb433d3ab6d;p=git-tools-moved-to-github.git id-pbuild.sh: call mk-deb-src when running as normal user --- diff --git a/id-deb-build/id-pbuild.sh b/id-deb-build/id-pbuild.sh index fdb1442..b1d586a 100755 --- a/id-deb-build/id-pbuild.sh +++ b/id-deb-build/id-pbuild.sh @@ -72,13 +72,20 @@ if test ! -x $MKDEBSRC; then exit 1 fi -if test -d deb-src; then +if $upload; then cd deb-src else - $MKDEBSRC -fi - -if test -d deb-src; then + if test "${SUDO_USER}"; then + if test ! -d deb-src; then + $MKDEBSRC + fi + else + if test -d deb-src; then + echo "Remove deb-src" + exit 1 + fi + $MKDEBSRC + fi cd deb-src fi