bin/isabelle
changeset 3502 ec22ba0a26ec
parent 3203 af42c8cc8e75
child 4333 1d326b826851
equal deleted inserted replaced
3501:4ab477ffb4c6 3502:ec22ba0a26ec
    24   echo "  Options are:"
    24   echo "  Options are:"
    25   echo "    -e MLTEXT    pass MLTEXT to the ML session"
    25   echo "    -e MLTEXT    pass MLTEXT to the ML session"
    26   echo "    -m MODE      add print mode for output"
    26   echo "    -m MODE      add print mode for output"
    27   echo "    -q           non-interactive session"
    27   echo "    -q           non-interactive session"
    28   echo "    -r           open heap file read-only"
    28   echo "    -r           open heap file read-only"
       
    29   echo "    -w           reset write permissions on OUTPUT"
    29   echo
    30   echo
    30   echo "  INPUT (default \"$ISABELLE_LOGIC\") and OUTPUT specify in/out heaps."
    31   echo "  INPUT (default \"$ISABELLE_LOGIC\") and OUTPUT specify in/out heaps."
    31   echo "  These are either names to be searched in the Isabelle path, or actual"
    32   echo "  These are either names to be searched in the Isabelle path, or actual"
    32   echo "  file names (then containing at least one /)."
    33   echo "  file names (then containing at least one /)."
    33   echo "  If INPUT is \"RAW_ML_SYSTEM\", just start the bare bones ML system."
    34   echo "  If INPUT is \"RAW_ML_SYSTEM\", just start the bare bones ML system."
    48 
    49 
    49 MLTEXT=""
    50 MLTEXT=""
    50 MODES=""
    51 MODES=""
    51 TERMINATE=""
    52 TERMINATE=""
    52 READONLY=""
    53 READONLY=""
       
    54 NOWRITE=""
    53 
    55 
    54 while getopts "e:m:qr" OPT
    56 while getopts "e:m:qrw" OPT
    55 do
    57 do
    56   case "$OPT" in
    58   case "$OPT" in
    57     e)
    59     e)
    58       MLTEXT="$MLTEXT $OPTARG"
    60       MLTEXT="$MLTEXT $OPTARG"
    59       ;;
    61       ;;
    67     q)
    69     q)
    68       TERMINATE=true
    70       TERMINATE=true
    69       ;;
    71       ;;
    70     r)
    72     r)
    71       READONLY=true
    73       READONLY=true
       
    74       ;;
       
    75     w)
       
    76       NOWRITE=true
    72       ;;
    77       ;;
    73     \?)
    78     \?)
    74       usage
    79       usage
    75       ;;
    80       ;;
    76   esac
    81   esac
   154 
   159 
   155 ML_SYSTEM_BASE=$(echo $ML_SYSTEM | cut -f1 -d-)
   160 ML_SYSTEM_BASE=$(echo $ML_SYSTEM | cut -f1 -d-)
   156 
   161 
   157 [ -n "$MODES" ] && MLTEXT="print_mode := [$MODES]; $MLTEXT"
   162 [ -n "$MODES" ] && MLTEXT="print_mode := [$MODES]; $MLTEXT"
   158 
   163 
   159 export INFILE OUTFILE MLTEXT TERMINATE
   164 export INFILE OUTFILE MLTEXT TERMINATE NOWRITE
   160 [ -f $ISABELLE_HOME/lib/scripts/run-$ML_SYSTEM ] && exec $ISABELLE_HOME/lib/scripts/run-$ML_SYSTEM
   165 [ -f $ISABELLE_HOME/lib/scripts/run-$ML_SYSTEM ] && exec $ISABELLE_HOME/lib/scripts/run-$ML_SYSTEM
   161 exec $ISABELLE_HOME/lib/scripts/run-$ML_SYSTEM_BASE
   166 exec $ISABELLE_HOME/lib/scripts/run-$ML_SYSTEM_BASE