From b01dff6d6f65ffd62930270cfa937e41d15ced60 Mon Sep 17 00:00:00 2001 From: "totten@civicrm.org" Date: Sat, 21 Jun 2014 02:26:45 -0700 Subject: [PATCH] distmaker - Auto-create DM_GENFILESDIR, DM_TARGETDIR, $DM_TMPDIR --- distmaker/distmaker.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/distmaker/distmaker.sh b/distmaker/distmaker.sh index d294d14c35..69e9b82d9f 100755 --- a/distmaker/distmaker.sh +++ b/distmaker/distmaker.sh @@ -81,11 +81,17 @@ check_conf() else source "$P/distmaker.conf" export DM_SOURCEDIR DM_GENFILESDIR DM_TMPDIR DM_TARGETDIR DM_PHP DM_RSYNC DM_ZIP DM_VERSION DM_REF_CORE DM_REF_DRUPAL DM_REF_DRUPAL6 DM_REF_JOOMLA DM_REF_WORDPRESS DM_REF_PACKAGES - for k in "$DM_SOURCEDIR" "$DM_GENFILESDIR" "$DM_TARGETDIR" "$DM_TMPDIR"; do - if [ ! -d "$k" ] ; then + if [ ! -d "$DM_SOURCEDIR" ]; then + echo; echo "ERROR! " DM_SOURCEDIR "directory not found!"; echo "(if you get empty directory name, it might mean that one of necessary variables is not set)"; echo; + fi + for k in "$DM_GENFILESDIR" "$DM_TARGETDIR" "$DM_TMPDIR"; do + if [ -z "$k" ] ; then echo; echo "ERROR! " $k "directory not found!"; echo "(if you get empty directory name, it might mean that one of necessary variables is not set)"; echo; exit 1 fi + if [ ! -d "$k" ]; then + mkdir -p "$k" + fi done fi } -- 2.25.1