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