added -g, -h options;
authorwenzelm
Fri Apr 04 19:11:19 1997 +0200 (1997-04-04)
changeset 2917c7411fce37e4
parent 2916 d761a62da697
child 2918 0305b0acba78
added -g, -h options;
replaced ISABELLE_HTML by ISABELLE_USEDIR_OPTIONS;
lib/Tools/usedir
     1.1 --- a/lib/Tools/usedir	Fri Apr 04 19:10:22 1997 +0200
     1.2 +++ b/lib/Tools/usedir	Fri Apr 04 19:11:19 1997 +0200
     1.3 @@ -17,6 +17,8 @@
     1.4    echo "  Options are:"
     1.5    echo "    -b           build mode (output heap image, use dir \".\")"
     1.6    echo "    -c           force copying of heap file (for Poly/ML)"
     1.7 +  echo "    -g BOOL      generate theory graph data (default false)"
     1.8 +  echo "    -h BOOL      generate theory HTML data (default false)"
     1.9    echo "    -s NAME      override session NAME"
    1.10    echo
    1.11    echo "  Build object-logic or run examples. Also creates browsing"
    1.12 @@ -32,26 +34,41 @@
    1.13  
    1.14  BUILD=""
    1.15  COPYDB=""
    1.16 +GRAPH=false
    1.17 +HTML=false
    1.18  SESSION=""
    1.19  
    1.20 -while getopts "bcs:" OPT
    1.21 -do
    1.22 -  case "$OPT" in
    1.23 -    b)
    1.24 -      BUILD=true
    1.25 -      ;;
    1.26 -    c)
    1.27 -      COPYDB="-c"
    1.28 -      ;;
    1.29 -    s)
    1.30 -      SESSION="$OPTARG"
    1.31 -      ;;
    1.32 -    \?)
    1.33 -      usage
    1.34 -      ;;
    1.35 -  esac
    1.36 -done
    1.37 +function getoptions()
    1.38 +{
    1.39 +  OPTIND=1
    1.40 +  while getopts "bcg:h:s:" OPT
    1.41 +  do
    1.42 +    case "$OPT" in
    1.43 +      b)
    1.44 +        BUILD=true
    1.45 +        ;;
    1.46 +      c)
    1.47 +        COPYDB="-c"
    1.48 +        ;;
    1.49 +      g)
    1.50 +        GRAPH="$OPTARG"
    1.51 +        ;;
    1.52 +      h)
    1.53 +        HTML="$OPTARG"
    1.54 +        ;;
    1.55 +      s)
    1.56 +        SESSION="$OPTARG"
    1.57 +        ;;
    1.58 +      \?)
    1.59 +        usage
    1.60 +        ;;
    1.61 +    esac
    1.62 +  done
    1.63 +}
    1.64  
    1.65 +getoptions $ISABELLE_USEDIR_OPTIONS
    1.66 +
    1.67 +getoptions "$@"
    1.68  shift $(($OPTIND - 1))
    1.69  
    1.70  
    1.71 @@ -70,13 +87,13 @@
    1.72  
    1.73  if [ -n "$BUILD" ]; then
    1.74    exec $ISABELLE \
    1.75 -    -e "make_html := $ISABELLE_HTML;" \
    1.76 +    -e "make_html := $HTML;" \
    1.77      -e "set_session\"$SESSION\";" \
    1.78      -e "exit_use_dir\".\";" \
    1.79      -q $COPYDB $LOGIC $NAME
    1.80  else
    1.81    exec $ISABELLE \
    1.82 -    -e "make_html := $ISABELLE_HTML;" \
    1.83 +    -e "make_html := $HTML;" \
    1.84      -e "set_session\"$SESSION\";" \
    1.85      -e "exit_use_dir\"$NAME\"; quit();" \
    1.86      -r -q $LOGIC