equal
deleted
inserted
replaced
1 #!/usr/bin/env bash |
|
2 # |
|
3 # $Id$ |
|
4 # Author: Markus Wenzel, TU Muenchen |
|
5 # |
|
6 # Isabelle interface startup script. |
|
7 |
|
8 if [ -L "$0" ]; then |
|
9 TARGET="$(LC_ALL=C ls -l "$0" | sed 's/.* -> //')" |
|
10 exec "$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd "$(dirname "$TARGET")"; pwd)/$(basename "$TARGET")" "$@" |
|
11 fi |
|
12 |
|
13 |
|
14 ## settings |
|
15 |
|
16 PRG="$(basename "$0")" |
|
17 |
|
18 ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)" |
|
19 source "$ISABELLE_HOME/lib/scripts/getsettings" || exit 2 |
|
20 |
|
21 |
|
22 ## diagnostics |
|
23 |
|
24 function fail() |
|
25 { |
|
26 echo "$1" >&2 |
|
27 exit 2 |
|
28 } |
|
29 |
|
30 |
|
31 ## main |
|
32 |
|
33 case "$ISABELLE_INTERFACE" in |
|
34 none) |
|
35 INTERFACE="$ISABELLE_PROCESS" |
|
36 ;; |
|
37 */*) |
|
38 INTERFACE="$ISABELLE_INTERFACE" |
|
39 ;; |
|
40 esac |
|
41 |
|
42 [ ! -x "$INTERFACE" ] && fail "Bad Isabelle interface: \"$ISABELLE_INTERFACE\"" |
|
43 |
|
44 exec "$INTERFACE" "$@" |
|