lib/scripts/getsettings
changeset 47465 71d5f37ee2bf
parent 47461 5a7903ba2dac
child 47490 f4348634595b
     1.1 --- a/lib/scripts/getsettings	Sat Apr 14 13:05:59 2012 +0200
     1.2 +++ b/lib/scripts/getsettings	Sat Apr 14 14:36:36 2012 +0200
     1.3 @@ -95,18 +95,27 @@
     1.4  
     1.5  #robust invocation via ISABELLE_JDK_HOME
     1.6  function isabelle_jdk () {
     1.7 -  [ -z "$ISABELLE_JDK_HOME" ] && \
     1.8 -    { echo "Unknown ISABELLE_JDK_HOME -- Java tools unavailable" >&2; return 2; }
     1.9 -  local PRG="$1"; shift
    1.10 -  "$ISABELLE_JDK_HOME/bin/$PRG" "$@"
    1.11 +  if [ -z "$ISABELLE_JDK_HOME" ]; then
    1.12 +    echo "Unknown ISABELLE_JDK_HOME -- Java tools unavailable" >&2
    1.13 +    return 2
    1.14 +  else
    1.15 +    local PRG="$1"; shift
    1.16 +    "$ISABELLE_JDK_HOME/bin/$PRG" "$@"
    1.17 +  fi
    1.18  }
    1.19  
    1.20  #robust invocation via SCALA_HOME
    1.21  function isabelle_scala () {
    1.22 -  [ -z "$SCALA_HOME" ] && \
    1.23 -    { echo "Unknown SCALA_HOME -- Scala unavailable" >&2; return 2; }
    1.24 -  local PRG="$1"; shift
    1.25 -  "$SCALA_HOME/bin/$PRG" "$@"
    1.26 +  if [ -z "$ISABELLE_JDK_HOME" ]; then
    1.27 +    echo "Unknown ISABELLE_JDK_HOME -- Java tools unavailable" >&2
    1.28 +    return 2
    1.29 +  elif [ -z "$SCALA_HOME" ]; then
    1.30 +    echo "Unknown SCALA_HOME -- Scala unavailable" >&2
    1.31 +    return 2
    1.32 +  else
    1.33 +    local PRG="$1"; shift
    1.34 +    "$SCALA_HOME/bin/$PRG" "$@"
    1.35 +  fi
    1.36  }
    1.37  
    1.38  #CLASSPATH convenience