Skip to content

Commit

Permalink
VDMCheck2.sh semicolon class path separator on Windows
Browse files Browse the repository at this point in the history
Fixes VDMCheck.sh for msys/git bash on windows
  • Loading branch information
CThuleHansen authored Jan 6, 2024
1 parent 22325e6 commit d3c054a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion fmi2/vdmcheck/src/main/scripts/VDMCheck2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,13 @@ function check() # $1 = the XML temp file to check, $2 = name of the file
BASE=$(basename $1)
sed -i -e "s+$BASE+$2+g" "$VDM"

java -Xmx1g -cp vdmj.jar:annotations.jar com.fujitsu.vdmj.VDMJ \
# Fix Class Path Separator - Default to colon for Unix-like systems, , semicolon for Windows
CLASSPATH_SEPARATOR=":"
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
CLASSPATH_SEPARATOR="\;"
fi

java -Xmx1g -cp vdmj.jar${CLASSPATH_SEPARATOR}annotations.jar com.fujitsu.vdmj.VDMJ \
-vdmsl -q -annotations -e "isValidFMIConfiguration($VAR)" \
model $VDM |
awk '/^true$/{ print "No errors found."; exit 0 };/^false$/{ print "Errors found."; exit 1 };{ print }'
Expand Down

0 comments on commit d3c054a

Please sign in to comment.