summaryrefslogtreecommitdiff
path: root/package.sh
diff options
context:
space:
mode:
authorJay Freeman <saurik@saurik.com>2009-08-09 20:18:12 +0000
committerJay Freeman <saurik@saurik.com>2009-08-09 20:18:12 +0000
commitb88784ad2f85711be2069d5f348e6404b37ecb94 (patch)
treee4d23e6c655e3df35d86a1719f0d173e7c7bb3f5 /package.sh
parenteae20da4e7f06ab8c5277c09db55b51bbbed3242 (diff)
Added a modified version of the fakeroot2 patch from jlanger on #188.
git-svn-id: http://svn.telesphoreo.org/trunk@654 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'package.sh')
-rwxr-xr-xpackage.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/package.sh b/package.sh
index cea69c4f2..10775ddb2 100755
--- a/package.sh
+++ b/package.sh
@@ -7,13 +7,24 @@ if [[ $# == 0 ]]; then
exit
fi
+if [[ $UID -ne 0 ]]; then
+ exec fakeroot "$0" "$@"
+fi
+
export PKG_MAKE=$0
export PKG_NAME=${1%_}
export PKG_BASE=$(realpath "$(dirname "$0")")
source "${PKG_BASE}/helper.sh"
-./make.sh "${PKG_NAME}"
+# when running fakeroot, we shouldn't use the previous build result
+# as we don't have the fakeroot session info anymore
+
+if [[ -z ${FAKEROOTKEY} ]]; then
+ ./make.sh "${PKG_NAME}"
+else
+ ./remake.sh "${PKG_NAME}"
+fi
pkg: mkdir -p /DEBIAN
./control.sh "${PKG_NAME}" control >"$(pkg_ /DEBIAN/control)"