blob: c9dc1d09535741de1e2fb543692308abcbccdb03 (
plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
--- a/apalache-mc
+++ b/apalache-mc
@@ -6,29 +6,22 @@
# packaged produced.
#
# Igor Konnov, Shon Feder 2018-2022
+#
+# Patch for system install
+# Ranadeep B
# See https://sipb.mit.edu/doc/safe-shell/
set -euf -o pipefail
-# The directory where the script is run from
-# See https://stackoverflow.com/a/246128/1187277
-SOURCE=${BASH_SOURCE[0]}
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
- DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )
- SOURCE=$(readlink "$SOURCE")
- [[ $SOURCE != /* ]] && SOURCE=$DIR/$SOURCE # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
-done
-DIR=$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )
+DIR="/usr/share/java/apalache"
-APALACHE_JAR=${APALACHE_JAR:-"$DIR/../lib/apalache.jar"}
+APALACHE_JAR=${APALACHE_JAR:-"${DIR}/apalache.jar"}
JVM_ARGS=${JVM_ARGS:-""}
if ! test -f "$APALACHE_JAR"
then
- echo "ERROR: No file found at ${APALACHE_JAR}"
- echo " Ensure you have run 'make package' and are running the script from the"
- echo " distribution pacakge, or else set APALACHE_JAR to point to your custom"
- echo " build jar."
+ echo "ERROR: Distribution jar not found. Is the jar file present in \"$DIR\"?"
+ exit 1
fi
# Check of the heap size is already set
@@ -48,9 +41,9 @@
# Check whether the CLI args contains the debug flag
if [[ "$*" =~ '--debug' ]]
then
- echo "# Tool home: $DIR"
+ echo "# Tool home: system"
echo "# Package: $APALACHE_JAR"
echo "# JVM args: $JVM_ARGS"
echo "# -Djava.io.tmpdir: $JAVA_IO_TMPDIR"
|