Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions idml2xml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand All @@ -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"
Expand Down