From 8a23b252a1bd787bc46dba486fbadf6008dab969 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 23 Apr 2012 23:38:48 -0400 Subject: Add a '-u' option to leave the work area unclean. --- (limited to 'src') diff --git a/src/opkbuild.sh b/src/opkbuild.sh index 16fc95d..52bf1bf 100644 --- a/src/opkbuild.sh +++ b/src/opkbuild.sh @@ -26,7 +26,8 @@ print_usage() { cat <&2 exit 1; @@ -79,6 +80,10 @@ while true; do dbg=true shift ;; + -u) + unclean=true + shift + ;; -s) status_override=${2} shift 2 @@ -109,6 +114,9 @@ fi if [ -z "${dbg}" ]; then dbg=false fi +if [ -z "${unclean}" ]; then + unclean=false +fi # Sanity checks. printf 'opkbuild: Checking for sanity...\n' @@ -358,6 +366,9 @@ for binpkgdir in ../*.pkg/; do fi done -# Clean up tmp. cd .. -rm -Rf tmp + +# Clean up tmp. +if ! ${unclean}; then + rm -Rf tmp +fi -- cgit v0.9.1