tuned comments;
authorwenzelm
Tue Mar 11 16:38:23 1997 +0100 (1997-03-11)
changeset 278733931e1023e3
parent 2786 b36ca42c409a
child 2788 0178e3cd9714
tuned comments;
added ISABELLE_TOOLS support;
bin/isatool
     1.1 --- a/bin/isatool	Tue Mar 11 16:24:44 1997 +0100
     1.2 +++ b/bin/isatool	Tue Mar 11 16:38:23 1997 +0100
     1.3 @@ -3,7 +3,7 @@
     1.4  # $Id$
     1.5  #
     1.6  # Isabelle tool starter -- provides settings environment,
     1.7 -#   also keeps your PATH name space clean.
     1.8 +#   and keeps your PATH name space clean.
     1.9  
    1.10  
    1.11  ## settings
    1.12 @@ -17,24 +17,29 @@
    1.13  
    1.14  ## diagnostics
    1.15  
    1.16 +TOOLDIRS=$(echo $ISABELLE_TOOLS | tr : " ")
    1.17 +
    1.18  function usage()
    1.19  {
    1.20    echo
    1.21    echo "Usage: $PRG TOOL [ARGS ...]"
    1.22    echo
    1.23    echo "  Start Isabelle utility program TOOL with ARGS. Pass \"-?\" to TOOL"
    1.24 -  echo "  for specific help."
    1.25 +  echo "  for more specific help."
    1.26    echo
    1.27    echo "  Availabe tools are:"
    1.28 -  echo
    1.29    (
    1.30 -    cd "$ISABELLE_HOME/lib/Tools"
    1.31 -    for T in *
    1.32 +    for DIR in $TOOLDIRS
    1.33      do
    1.34 -      if [ -f "$T" -a -x "$T" ]; then
    1.35 -        DESCRLINE=$(grep DESCRIPTION: "$T" | sed -e 's/^.*DESCRIPTION: *//')
    1.36 -        echo "    $T - $DESCRLINE"
    1.37 -      fi
    1.38 +      cd $DIR
    1.39 +      echo
    1.40 +      for T in *
    1.41 +      do
    1.42 +        if [ -f "$T" -a -x "$T" ]; then
    1.43 +          DESCRLINE=$(grep DESCRIPTION: "$T" | sed -e 's/^.*DESCRIPTION: *//')
    1.44 +          echo "    $T - $DESCRLINE"
    1.45 +        fi
    1.46 +      done
    1.47      done
    1.48    )
    1.49    echo
    1.50 @@ -48,14 +53,20 @@
    1.51  }
    1.52  
    1.53  
    1.54 -## main
    1.55 +## args
    1.56  
    1.57  [ $# -lt 1 -o "$1" = "-?" ] && usage
    1.58  
    1.59 -TOOL_BASE="$1"
    1.60 -TOOL="$ISABELLE_HOME/lib/Tools/$1"
    1.61 +TOOLNAME="$1"
    1.62  shift
    1.63  
    1.64 -[ -f "$TOOL" -a -x "$TOOL" ] && exec "$TOOL" "$@"
    1.65 +
    1.66 +## main
    1.67  
    1.68 -fail "Tool not found: $TOOL_BASE"
    1.69 +for DIR in $TOOLDIRS
    1.70 +do
    1.71 +  TOOL=$DIR/$TOOLNAME
    1.72 +  [ -f "$TOOL" -a -x "$TOOL" ] && exec "$TOOL" "$@"
    1.73 +done
    1.74 +
    1.75 +fail "Unknown isabelle tool: $TOOLNAME"