author | haftmann |
Mon, 21 Aug 2006 11:02:39 +0200 | |
changeset 20400 | 0ad2f3bbd4f0 |
parent 15980 | 3dfcdb19f242 |
child 28502 | 6b0e3e4e1891 |
permissions | -rwxr-xr-x |
11550
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
1 |
#!/usr/bin/env bash |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
2 |
# |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
3 |
# $Id$ |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
4 |
# Author: Markus Wenzel, TU Muenchen |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
5 |
# |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
6 |
# Isabelle interface startup script. |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
7 |
|
15843 | 8 |
if [ -L "$0" ]; then |
9 |
TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')" |
|
15967 | 10 |
exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@" |
15843 | 11 |
fi |
12 |
||
11550
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
13 |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
14 |
## settings |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
15 |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
16 |
PRG="$(basename "$0")" |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
17 |
|
15967 | 18 |
ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)" |
19 |
source "$ISABELLE_HOME/lib/scripts/getsettings" || exit 2 |
|
11550
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
20 |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
21 |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
22 |
## diagnostics |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
23 |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
24 |
function fail() |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
25 |
{ |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
26 |
echo "$1" >&2 |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
27 |
exit 2 |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
28 |
} |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
29 |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
30 |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
31 |
## main |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
32 |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
33 |
case "$ISABELLE_INTERFACE" in |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
34 |
none) |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
35 |
INTERFACE="$ISABELLE" |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
36 |
;; |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
37 |
*/*) |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
38 |
INTERFACE="$ISABELLE_INTERFACE" |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
39 |
;; |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
40 |
esac |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
41 |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
42 |
[ ! -x "$INTERFACE" ] && fail "Bad Isabelle interface: \"$ISABELLE_INTERFACE\"" |
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
43 |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
44 |
exec "$INTERFACE" "$@" |