author | wenzelm |
Fri, 05 Oct 2001 23:58:52 +0200 | |
changeset 11703 | 6e5de8d4290a |
parent 11553 | 87b585079d01 |
child 12598 | fa556d3fe5f2 |
permissions | -rw-r--r-- |
11553 | 1 |
# -*- shell-script -*- |
2307 | 2 |
# $Id$ |
9789 | 3 |
# Author: Markus Wenzel, TU Muenchen |
4 |
# License: GPL (GNU GENERAL PUBLIC LICENSE) |
|
2299
ed9720047d53
getsettings: bash source script to augment current env.
wenzelm
parents:
diff
changeset
|
5 |
# |
2348 | 6 |
# getsettings - bash source script to augment current env. |
2299
ed9720047d53
getsettings: bash source script to augment current env.
wenzelm
parents:
diff
changeset
|
7 |
# |
ed9720047d53
getsettings: bash source script to augment current env.
wenzelm
parents:
diff
changeset
|
8 |
|
7770
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
9 |
if [ -z "$ISABELLE_SETTINGS_PRESENT" ] |
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
10 |
then |
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
11 |
|
3185 | 12 |
set -o allexport |
13 |
||
7770
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
14 |
ISABELLE_SETTINGS_PRESENT=true |
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
15 |
|
2736 | 16 |
#normalize ISABELLE_HOME as passed by caller |
9789 | 17 |
ISABELLE_HOME=$(cd "$ISABELLE_HOME"; echo "$PWD") |
2736 | 18 |
|
11553 | 19 |
#key executables |
20 |
ISABELLE="$ISABELLE_HOME/bin/isabelle-process" |
|
9789 | 21 |
ISATOOL="$ISABELLE_HOME/bin/isatool" |
2299
ed9720047d53
getsettings: bash source script to augment current env.
wenzelm
parents:
diff
changeset
|
22 |
|
2643 | 23 |
#users tend to put strange things in here ... |
2621 | 24 |
unset ENV |
25 |
unset BASH_ENV |
|
26 |
||
9680 | 27 |
#support easy settings |
28 |
function choosefrom () |
|
29 |
{ |
|
30 |
local RESULT="" |
|
31 |
local FILE="" |
|
32 |
||
33 |
for FILE in "$@" |
|
34 |
do |
|
35 |
[ -z "$RESULT" -a -e "$FILE" ] && RESULT="$FILE" |
|
36 |
done |
|
37 |
||
38 |
[ -z "$RESULT" ] && RESULT="$FILE" |
|
39 |
echo "$RESULT" |
|
40 |
} |
|
41 |
||
2643 | 42 |
#get actual settings |
9789 | 43 |
. "$ISABELLE_HOME/etc/settings" || exit 2 |
9227 | 44 |
ISABELLE_SITE_SETTINGS_PRESENT=true |
9789 | 45 |
|
46 |
[ "$ISABELLE_HOME" -ef "$ISABELLE_HOME_USER" ] && \ |
|
47 |
{ echo >&2 "### ISABELLE_HOME and ISABELLE_HOME_USER should not be the same directory!"; } |
|
48 |
[ -f "$ISABELLE_HOME_USER/etc/settings" ] && . "$ISABELLE_HOME_USER/etc/settings" |
|
2299
ed9720047d53
getsettings: bash source script to augment current env.
wenzelm
parents:
diff
changeset
|
49 |
|
6413 | 50 |
#append ML system identifier to paths |
51 |
if [ -z "$ML_PLATFORM" ]; then |
|
52 |
ML_IDENTIFIER="$ML_SYSTEM" |
|
53 |
else |
|
54 |
ML_IDENTIFIER="${ML_SYSTEM}_${ML_PLATFORM}" |
|
55 |
fi |
|
56 |
ISABELLE_OUTPUT="$ISABELLE_OUTPUT/$ML_IDENTIFIER" |
|
3118 | 57 |
|
2299
ed9720047d53
getsettings: bash source script to augment current env.
wenzelm
parents:
diff
changeset
|
58 |
set +o allexport |
7770
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
59 |
|
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
60 |
fi |