lib/scripts/getsettings
author wenzelm
Thu Oct 07 12:25:20 1999 +0200 (1999-10-07)
changeset 7770 0497323c1f0b
parent 6413 b2f2770ef8d9
child 9227 298ae5f69b18
permissions -rw-r--r--
ISABELLE_SETTINGS_PRESENT: avoid multiple invocation;
wenzelm@2307
     1
#
wenzelm@2307
     2
# $Id$
wenzelm@2299
     3
#
wenzelm@2348
     4
# getsettings - bash source script to augment current env.
wenzelm@2299
     5
#
wenzelm@2299
     6
wenzelm@7770
     7
if [ -z "$ISABELLE_SETTINGS_PRESENT" ]
wenzelm@7770
     8
then
wenzelm@7770
     9
wenzelm@3185
    10
set -o allexport
wenzelm@3185
    11
wenzelm@7770
    12
ISABELLE_SETTINGS_PRESENT=true
wenzelm@7770
    13
wenzelm@2736
    14
#normalize ISABELLE_HOME as passed by caller
wenzelm@2736
    15
ISABELLE_HOME=$(cd $ISABELLE_HOME; echo $PWD)
wenzelm@2736
    16
wenzelm@3185
    17
#main executables
wenzelm@3185
    18
ISABELLE=$ISABELLE_HOME/bin/isabelle
wenzelm@3185
    19
ISATOOL=$ISABELLE_HOME/bin/isatool
wenzelm@2299
    20
wenzelm@2643
    21
#users tend to put strange things in here ...
wenzelm@2621
    22
unset ENV
wenzelm@2621
    23
unset BASH_ENV
wenzelm@2621
    24
wenzelm@2643
    25
#get actual settings
wenzelm@2428
    26
. $ISABELLE_HOME/etc/settings || exit 2
wenzelm@2299
    27
[ -f $ISABELLE_HOME_USER/etc/settings ] && . $ISABELLE_HOME_USER/etc/settings
wenzelm@2299
    28
wenzelm@6413
    29
#append ML system identifier to paths
wenzelm@6413
    30
if [ -z "$ML_PLATFORM" ]; then
wenzelm@6413
    31
  ML_IDENTIFIER="$ML_SYSTEM"
wenzelm@6413
    32
else
wenzelm@6413
    33
  ML_IDENTIFIER="${ML_SYSTEM}_${ML_PLATFORM}"
wenzelm@6413
    34
fi
wenzelm@6413
    35
ISABELLE_OUTPUT="$ISABELLE_OUTPUT/$ML_IDENTIFIER"
wenzelm@6413
    36
ISABELLE_PATH=$(for DIR in $(echo $ISABELLE_PATH | tr : " "); do echo $DIR/$ML_IDENTIFIER; done)
wenzelm@3118
    37
ISABELLE_PATH=$(echo $ISABELLE_PATH | tr " " :)
wenzelm@3118
    38
wenzelm@2299
    39
set +o allexport
wenzelm@7770
    40
wenzelm@7770
    41
fi