Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VDMCheck2.sh semicolon class path separator on Windows #30

Merged
merged 2 commits into from
Jan 7, 2024
Merged
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
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 msys
CLASSPATH_SEPARATOR=":"
if [ $OSTYPE == "msys" ]; 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
Loading