forked from viperproject/carbon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcarbon.sh
executable file
·31 lines (23 loc) · 906 Bytes
/
carbon.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
# To verify a SIL file 'test.sil', run './carbon.sh test.sil'.
#
# The script expects the environment variable $BOOGIE_HOME to be set, e.g.
# export BOOGIE_HOME=/home/severinh/Software/boogie
# Consider adding such a line to your ~/.profile.
#
# Ensure that the file 'Boogie.exe' in the Boogie folder is executable.
# Note that the 'z3.exe' file must be located inside the Boogie folder.
#
# Alternatively you could also just set the BOOGIE_EXE and Z3_EXE to point o
# the executable files
set -e
BOOGIE_EXE="${BOOGIE_EXE:-$BOOGIE_HOME/Boogie.exe}"
Z3_EXE="${Z3_EXE:-$BOOGIE_HOME/z3.exe}"
export Z3_EXE
export BOOGIE_EXE
BASEDIR="$(realpath "$(dirname "$0")")"
CP_FILE="$BASEDIR/carbon_classpath.txt"
if [ ! -f "$CP_FILE" ]; then
(cd "$BASEDIR"; sbt "export runtime:dependencyClasspath" | tail -n1 > "$CP_FILE")
fi
exec java -Xss30M -cp "$(cat "$CP_FILE")" viper.carbon.Carbon "$@"