lib/scripts/getsettings
author wenzelm
Sat, 01 Jul 2000 19:49:48 +0200
changeset 9227 298ae5f69b18
parent 7770 0497323c1f0b
child 9680 6581bfc8421e
permissions -rw-r--r--
added ISABELLE_SITE_SETTINGS_PRESENT;

#
# $Id$
#
# getsettings - bash source script to augment current env.
#

if [ -z "$ISABELLE_SETTINGS_PRESENT" ]
then

set -o allexport

ISABELLE_SETTINGS_PRESENT=true

#normalize ISABELLE_HOME as passed by caller
ISABELLE_HOME=$(cd $ISABELLE_HOME; echo $PWD)

#main executables
ISABELLE=$ISABELLE_HOME/bin/isabelle
ISATOOL=$ISABELLE_HOME/bin/isatool

#users tend to put strange things in here ...
unset ENV
unset BASH_ENV

#get actual settings
. $ISABELLE_HOME/etc/settings || exit 2
ISABELLE_SITE_SETTINGS_PRESENT=true
[ -f $ISABELLE_HOME_USER/etc/settings ] && . $ISABELLE_HOME_USER/etc/settings

#append ML system identifier to paths
if [ -z "$ML_PLATFORM" ]; then
  ML_IDENTIFIER="$ML_SYSTEM"
else
  ML_IDENTIFIER="${ML_SYSTEM}_${ML_PLATFORM}"
fi
ISABELLE_OUTPUT="$ISABELLE_OUTPUT/$ML_IDENTIFIER"
ISABELLE_PATH=$(for DIR in $(echo $ISABELLE_PATH | tr : " "); do echo $DIR/$ML_IDENTIFIER; done)
ISABELLE_PATH=$(echo $ISABELLE_PATH | tr " " :)

set +o allexport

fi