summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2011-08-21 15:54:25 +0200
committerJustin Davis <jrcd83@gmail.com>2011-08-21 15:54:25 +0200
commit6995489779b34a546787b6f778b2f2a859fc4327 (patch)
treecd81439241723906192c2a5673300888833e9c36 /bin
parent6477b900517f0721acc3243b075f58dd0011b2e5 (diff)
downloadgenpkg-6995489779b34a546787b6f778b2f2a859fc4327.tar.gz
genpkg-6995489779b34a546787b6f778b2f2a859fc4327.tar.xz
Allow overriding of destination PKGBUILD root dir.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/pbj7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/pbj b/bin/pbj
index 0ca06f8..d232acc 100755
--- a/bin/pbj
+++ b/bin/pbj
@@ -21,7 +21,12 @@ if [ ! -d "$bindir" ] ; then
fi
PATH="$PATH:$bindir"
-pkgroot="$(pwd)/pkg"
+if [ -n "$PKGROOT" ] ; then
+ pkgroot="$PKGROOT"
+else
+ pkgroot="$(pwd)/pkg"
+fi
+
if [ ! -d "$pkgroot" ] ; then
die "$pkgroot does not exist"
fi