##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.
# remove any quote characters in the value.
new_value="${new_value//\"/}"
+echo "new value: '$var' = '$new_value'"
eval "export $var=\"$new_value\""
- echo "new value established: $var='${!var}'"
}
# for a windows build, this will replace any forward slashes
#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
}