summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Ball <nullspoon@oper.io>2017-06-23 08:28:26 -0600
committerAaron Ball <nullspoon@oper.io>2017-06-23 08:28:26 -0600
commita74427fbf573bef7d9624364b1fd50d8947bd3a9 (patch)
tree00a1ad5d98b37115f5986a8d0004758ffe2f387b
parent533cff3fadcf3b4bf2e18fe011459620a2e3b757 (diff)
downloadportimg-a74427fbf573bef7d9624364b1fd50d8947bd3a9.tar.gz
portimg-a74427fbf573bef7d9624364b1fd50d8947bd3a9.tar.xz
pkgimg:Added KEEP_BUILD support
This new flag will prevent the port build cleanup process. This is useful for package devs to check the contents of the source path, pkg build destination, make manual changes to test things, etc. KEEP_BUILD defaults to 0 (don't keep builds). Just export to 1 (or anything but 0 really) and individual port builds will persist.
-rwxr-xr-xbin/pkgimg.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/pkgimg.sh b/bin/pkgimg.sh
index fdece5a..50b721d 100755
--- a/bin/pkgimg.sh
+++ b/bin/pkgimg.sh
@@ -26,6 +26,7 @@ source ${LIBDIR}/pkg.sh
source ${LIBDIR}/config.sh
export PORTSDIR=${PORTSDIR:-${BASEDIR}/ports}
+export KEEP_BUILD=${KEEP_BUILD:-0}
function main {
local manifest=${1:-}
@@ -49,7 +50,11 @@ function main {
rsync -a ${PORTTMP}/pkg/ ${installbase}/
# Cleanup
- rm -rf ${PORTTMP}
+ if [ "${KEEP_BUILD}" = 0 ]; then
+ rm -rf ${PORTTMP}
+ else
+ linfo "KEEP_BUILD is set. Skipping cleanup of ${port}."
+ fi
done
dump_configs

Generated by cgit