diff --git a/idml2xml.sh b/idml2xml.sh index 9e215c8..fc0faa9 100755 --- a/idml2xml.sh +++ b/idml2xml.sh @@ -77,18 +77,23 @@ if [ -e $LOG ]; then fi # debugging -DEBUG_DIR=$OUT_DIR/$BASENAME.debug +DEBUG_DIR=$OUT_DIR +DEBUG_DIR_NAME=$BASENAME.debug # make absolute paths if $cygwin; then - FILE=$(cygpath -ma "$FILE") - DIR=$(cygpath -ma "$DIR") - OUT_DIR=$(cygpath -ma "$OUT_DIR") - DEBUG_DIR_URI=file:/$(cygpath -ma "$DEBUG_DIR" ) + FILE="$(cygpath -ma "$FILE")" + DIR="$(cygpath -ma "$DIR")" + OUT_DIR="$(cygpath -ma "$OUT_DIR")" + DEBUG_DIR_URI="file:/$(cygpath -ma "$DEBUG_DIR")/$DEBUG_DIR_NAME" else - DEBUG_DIR_URI=file:$(readlink -f $DEBUG_DIR) + # ensure proper file:/// URI + DEBUG_DIR_URI="file://$(readlink -f "$DEBUG_DIR")/$DEBUG_DIR_NAME" fi +# RESULT_URI (fix for XC0050 on macOS) +RESULT_URI="file://$(readlink -f "$OUT_DIR")/$BASENAME.xml" + # check if file exists if [ ! -f $FILE ]; then exitonerror 1 "input file not found: $FILE" @@ -104,6 +109,8 @@ if [ "$DEBUG" = "yes" ]; then echo " workdir: $DIR" echo " outdir: $OUT_DIR" echo " file: $FILE" + echo " result-uri: $RESULT_URI" + echo " debug-dir-uri: $DEBUG_DIR_URI" echo "" fi @@ -119,7 +126,7 @@ HEAP=$HEAP $CALABASH \ # delete temp files if [ "$DEBUG" != "yes" ]; then - rm -rf $FILE.tmp $DEBUG_DIR + rm -rf $FILE.tmp $DEBUG_DIR/$DEBUG_DIR_NAME fi echo "writing xml => $OUT_DIR/$BASENAME.xml"