author | wenzelm |
Thu, 24 Aug 2000 00:53:53 +0200 | |
changeset 9680 | 6581bfc8421e |
parent 9227 | 298ae5f69b18 |
child 9789 | 7e5e6c47c0b5 |
permissions | -rw-r--r-- |
2307 | 1 |
# |
2 |
# $Id$ |
|
2299
ed9720047d53
getsettings: bash source script to augment current env.
wenzelm
parents:
diff
changeset
|
3 |
# |
2348 | 4 |
# getsettings - bash source script to augment current env. |
2299
ed9720047d53
getsettings: bash source script to augment current env.
wenzelm
parents:
diff
changeset
|
5 |
# |
ed9720047d53
getsettings: bash source script to augment current env.
wenzelm
parents:
diff
changeset
|
6 |
|
7770
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
7 |
if [ -z "$ISABELLE_SETTINGS_PRESENT" ] |
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
8 |
then |
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
9 |
|
3185 | 10 |
set -o allexport |
11 |
||
7770
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
12 |
ISABELLE_SETTINGS_PRESENT=true |
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
13 |
|
2736 | 14 |
#normalize ISABELLE_HOME as passed by caller |
15 |
ISABELLE_HOME=$(cd $ISABELLE_HOME; echo $PWD) |
|
16 |
||
3185 | 17 |
#main executables |
18 |
ISABELLE=$ISABELLE_HOME/bin/isabelle |
|
19 |
ISATOOL=$ISABELLE_HOME/bin/isatool |
|
2299
ed9720047d53
getsettings: bash source script to augment current env.
wenzelm
parents:
diff
changeset
|
20 |
|
2643 | 21 |
#users tend to put strange things in here ... |
2621 | 22 |
unset ENV |
23 |
unset BASH_ENV |
|
24 |
||
9680 | 25 |
#support easy settings |
26 |
function choosefrom () |
|
27 |
{ |
|
28 |
local RESULT="" |
|
29 |
local FILE="" |
|
30 |
||
31 |
for FILE in "$@" |
|
32 |
do |
|
33 |
[ -z "$RESULT" -a -e "$FILE" ] && RESULT="$FILE" |
|
34 |
done |
|
35 |
||
36 |
[ -z "$RESULT" ] && RESULT="$FILE" |
|
37 |
echo "$RESULT" |
|
38 |
} |
|
39 |
||
2643 | 40 |
#get actual settings |
2428 | 41 |
. $ISABELLE_HOME/etc/settings || exit 2 |
9227 | 42 |
ISABELLE_SITE_SETTINGS_PRESENT=true |
2299
ed9720047d53
getsettings: bash source script to augment current env.
wenzelm
parents:
diff
changeset
|
43 |
[ -f $ISABELLE_HOME_USER/etc/settings ] && . $ISABELLE_HOME_USER/etc/settings |
ed9720047d53
getsettings: bash source script to augment current env.
wenzelm
parents:
diff
changeset
|
44 |
|
6413 | 45 |
#append ML system identifier to paths |
46 |
if [ -z "$ML_PLATFORM" ]; then |
|
47 |
ML_IDENTIFIER="$ML_SYSTEM" |
|
48 |
else |
|
49 |
ML_IDENTIFIER="${ML_SYSTEM}_${ML_PLATFORM}" |
|
50 |
fi |
|
51 |
ISABELLE_OUTPUT="$ISABELLE_OUTPUT/$ML_IDENTIFIER" |
|
52 |
ISABELLE_PATH=$(for DIR in $(echo $ISABELLE_PATH | tr : " "); do echo $DIR/$ML_IDENTIFIER; done) |
|
3118 | 53 |
ISABELLE_PATH=$(echo $ISABELLE_PATH | tr " " :) |
54 |
||
2299
ed9720047d53
getsettings: bash source script to augment current env.
wenzelm
parents:
diff
changeset
|
55 |
set +o allexport |
7770
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
56 |
|
0497323c1f0b
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm
parents:
6413
diff
changeset
|
57 |
fi |