| author | gagern |
| Wed, 27 Apr 2005 23:02:08 +0200 | |
| changeset 15864 | cc1b4a289321 |
| parent 15843 | d5bd4a18ce70 |
| child 15967 | f9163c6f69d6 |
| 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/.* -> //')" |
|
| 15864 | 10 |
exec "$(cd "$(dirname "$0")"; 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 |
|
| 15843 | 18 |
ISABELLE_HOME="$(dirname "$0")/.." |
|
11550
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
19 |
. "$ISABELLE_HOME/lib/scripts/getsettings" || \ |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
20 |
{ echo "$PRG probably not called from its original place!"; exit 2; }
|
|
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 |
|
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
23 |
## diagnostics |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
24 |
|
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
25 |
function fail() |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
26 |
{
|
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
27 |
echo "$1" >&2 |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
28 |
exit 2 |
|
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 |
|
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
32 |
## main |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
33 |
|
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
34 |
case "$ISABELLE_INTERFACE" in |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
35 |
none) |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
36 |
INTERFACE="$ISABELLE" |
|
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 |
*/*) |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
39 |
INTERFACE="$ISABELLE_INTERFACE" |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
40 |
;; |
|
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 |
INTERFACE="$ISABELLE_HOME/lib/scripts/isa-$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 |
esac |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
45 |
|
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
46 |
[ ! -x "$INTERFACE" ] && fail "Bad Isabelle interface: \"$ISABELLE_INTERFACE\"" |
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
47 |
|
|
915c5de6480f
smart selection of isabelle-process versus isabelle-interface;
wenzelm
parents:
diff
changeset
|
48 |
exec "$INTERFACE" "$@" |