author | wenzelm |
Sun, 13 Mar 2011 19:16:19 +0100 | |
changeset 41952 | c7297638599b |
parent 41690 | 53b1da988e75 |
permissions | -rwxr-xr-x |
40243
3102b27ca03a
adding a simple check to only run with a SWI-Prolog version known to work
bulwahn
parents:
diff
changeset
|
1 |
#!/usr/bin/env bash |
3102b27ca03a
adding a simple check to only run with a SWI-Prolog version known to work
bulwahn
parents:
diff
changeset
|
2 |
# |
3102b27ca03a
adding a simple check to only run with a SWI-Prolog version known to work
bulwahn
parents:
diff
changeset
|
3 |
# Author: Lukas Bulwahn, TU Muenchen, 2010 |
3102b27ca03a
adding a simple check to only run with a SWI-Prolog version known to work
bulwahn
parents:
diff
changeset
|
4 |
# |
3102b27ca03a
adding a simple check to only run with a SWI-Prolog version known to work
bulwahn
parents:
diff
changeset
|
5 |
# Determine SWI-Prolog version |
3102b27ca03a
adding a simple check to only run with a SWI-Prolog version known to work
bulwahn
parents:
diff
changeset
|
6 |
|
41952
c7297638599b
cleanup of former settings GHC_PATH, EXEC_GHC, EXEC_OCAML, EXEC_SWIPL, EXEC_YAP -- discontinued implicit detection;
wenzelm
parents:
41690
diff
changeset
|
7 |
if [ "$ISABELLE_SWIPL" != "" ]; then |
c7297638599b
cleanup of former settings GHC_PATH, EXEC_GHC, EXEC_OCAML, EXEC_SWIPL, EXEC_YAP -- discontinued implicit detection;
wenzelm
parents:
41690
diff
changeset
|
8 |
VERSION="$("$ISABELLE_SWIPL" --version)" |
41690
53b1da988e75
making the bash script swipl_version closer to Isabelle's conventional bash scripts
bulwahn
parents:
41308
diff
changeset
|
9 |
REGEXP='^SWI-Prolog version ([0-9\.]*) for .*$' |
53b1da988e75
making the bash script swipl_version closer to Isabelle's conventional bash scripts
bulwahn
parents:
41308
diff
changeset
|
10 |
if [[ "$VERSION" =~ $REGEXP ]]; then |
41952
c7297638599b
cleanup of former settings GHC_PATH, EXEC_GHC, EXEC_OCAML, EXEC_SWIPL, EXEC_YAP -- discontinued implicit detection;
wenzelm
parents:
41690
diff
changeset
|
11 |
echo -n "${BASH_REMATCH[1]}" |
41690
53b1da988e75
making the bash script swipl_version closer to Isabelle's conventional bash scripts
bulwahn
parents:
41308
diff
changeset
|
12 |
else |
41952
c7297638599b
cleanup of former settings GHC_PATH, EXEC_GHC, EXEC_OCAML, EXEC_SWIPL, EXEC_YAP -- discontinued implicit detection;
wenzelm
parents:
41690
diff
changeset
|
13 |
echo -n undefined |
41690
53b1da988e75
making the bash script swipl_version closer to Isabelle's conventional bash scripts
bulwahn
parents:
41308
diff
changeset
|
14 |
fi |
40243
3102b27ca03a
adding a simple check to only run with a SWI-Prolog version known to work
bulwahn
parents:
diff
changeset
|
15 |
fi |