From a175f99f6116f96faa57ad1cd4a5bcb433d3ab6d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 17 Oct 2011 10:44:48 +0200 Subject: [PATCH] id-pbuild.sh: call mk-deb-src when running as normal user --- id-deb-build/id-pbuild.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) 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 -- 1.7.10.4