X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fgenerator%2Fwrapdoze.sh;h=c28d0e722e68afe0e8b28f39f7bb85988ae3776c;hb=d87617f212d9dff8d5033b81e19a0740846999fe;hp=b3a3dd1c61c75730e418e8bd35a5dd9dfded591f;hpb=6bac9446c8b7c594001ea05afc4b425a10a49113;p=feisty_meow.git diff --git a/scripts/generator/wrapdoze.sh b/scripts/generator/wrapdoze.sh index b3a3dd1c..c28d0e72 100755 --- a/scripts/generator/wrapdoze.sh +++ b/scripts/generator/wrapdoze.sh @@ -8,11 +8,16 @@ function dossify_environment_variable() { local var="$1"; shift +#cygpath doesn't handle multiple path variables properly and otherwise operates only on one path element. +## new_value="$(cygpath -p -d ${!var})" +## eval "export $var=\"$new_value\"" +##echo "hey now the var is '${!var}'" + old_value="${!var}" +#echo "var is '$var' and old value is '$old_value'" if [[ ! "$old_value" =~ \/cygdrive\/ ]]; then #echo didnt have a cygdrive in it: $old_value return 0 -#hmmm: want this to continue in multi parm version. fi # replace single back-slashes with double ones. @@ -21,7 +26,7 @@ function dossify_environment_variable() # remove any quote characters in the value. new_value="${new_value//\"/}" -# echo "new value: $var = $new_value" +echo "new value: '$var' = '$new_value'" eval "export $var=\"$new_value\"" } @@ -91,11 +96,14 @@ function dossify_and_run_commands() #new approach that creates a cmd file. cmdfile="$(mktemp $CLAM_TMP/build_cmds.XXXXXX)" echo "${real_commands[@]}" >"$cmdfile" -#echo "**** cmd file is $cmdfile" +echo "** cmd file is: '$cmdfile')" +#echo "** cmd file has: $(cat "$cmdfile")" cmd /c $(cat "$cmdfile") retval=$? - rm "$cmdfile" - + # leave the file for inspection if there was an error. + if [ $retval -eq 0 ]; then + \rm "$cmdfile" + fi return $retval }