forked from boogie-org/boogie
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add wrapper script to run Boogie on non-Windows systems using Mono (c…
…loses boogie-org#105)
- Loading branch information
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Wrapper script to run Boogie.exe on non-Windows systems using Mono | ||
# | ||
# Adapted from https://github.com/Microsoft/dafny/blob/master/Binaries/dafny | ||
|
||
MONO=$(which mono) | ||
|
||
# find the source directory for this script even if it's been symlinked | ||
# from https://stackoverflow.com/questions/59895/ | ||
SOURCE="${BASH_SOURCE[0]}" | ||
while [ -h "$SOURCE" ]; do | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
SOURCE="$(readlink "$SOURCE")" | ||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" | ||
done | ||
BOOGIE_ROOT="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
BOOGIE="$BOOGIE_ROOT/Boogie.exe" | ||
|
||
if [[ ! -x "$MONO" ]]; then | ||
echo "Error: Boogie requires Mono to run on non-Windows systems." | ||
exit 1 | ||
fi | ||
|
||
if [[ ! -e "$BOOGIE" ]]; then | ||
echo "Error: Boogie.exe not found at $BOOGIE." | ||
exit 1 | ||
fi | ||
|
||
"$MONO" "$BOOGIE" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters