changeset 1821:d3b5e8a635ea

KEEP_STAGEDIR still needs to create directory if it doesn't exist.
author Rob Landley <rob@landley.net>
date Sat, 28 Nov 2015 16:44:52 -0600
parents e9732d0fad99
children 4927c8b8de1b
files sources/functions.sh
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sources/functions.sh	Sat Nov 28 16:40:45 2015 -0600
+++ b/sources/functions.sh	Sat Nov 28 16:44:52 2015 -0600
@@ -73,7 +73,12 @@
 
   STAGE_DIR="$BUILD/${STAGE_NAME}-${ARCH_NAME}"
 
-  [ -z "$KEEP_STAGEDIR" ] && blank_tempdir "$STAGE_DIR"
+  if [ -z "$KEEP_STAGEDIR" ]
+  then
+    blank_tempdir "$STAGE_DIR"
+  else
+    mkdir -p "$STAGE_DIR" || dienow
+  fi
   NO_CLEANUP=${NO_CLEANUP/temp//} blank_tempdir "$WORK"
 
   export PATH="$(cc_path "$ARCH")$PATH"