bin/isabelle-process
changeset 52056 fc458f304f93
parent 52054 eaf17514aabd
     1.1 --- a/bin/isabelle-process	Fri May 17 18:50:55 2013 +0200
     1.2 +++ b/bin/isabelle-process	Fri May 17 19:04:52 2013 +0200
     1.3 @@ -33,6 +33,7 @@
     1.4    echo "    -W IN:OUT    startup process wrapper, with input/output fifos"
     1.5    echo "    -e MLTEXT    pass MLTEXT to the ML session"
     1.6    echo "    -m MODE      add print mode for output"
     1.7 +  echo "    -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)"
     1.8    echo "    -q           non-interactive session"
     1.9    echo "    -r           open heap file read-only"
    1.10    echo "    -w           reset write permissions on OUTPUT"
    1.11 @@ -63,11 +64,12 @@
    1.12  WRAPPER_FIFOS=""
    1.13  MLTEXT=""
    1.14  MODES=""
    1.15 +declare -a SYSTEM_OPTIONS=()
    1.16  TERMINATE=""
    1.17  READONLY=""
    1.18  NOWRITE=""
    1.19  
    1.20 -while getopts "IPST:W:e:m:qrw" OPT
    1.21 +while getopts "IPST:W:e:m:o:qrw" OPT
    1.22  do
    1.23    case "$OPT" in
    1.24      I)
    1.25 @@ -95,6 +97,9 @@
    1.26          MODES="\"$OPTARG\", $MODES"
    1.27        fi
    1.28        ;;
    1.29 +    o)
    1.30 +      SYSTEM_OPTIONS["${#SYSTEM_OPTIONS[@]}"]="$OPTARG"
    1.31 +      ;;
    1.32      q)
    1.33        TERMINATE=true
    1.34        ;;
    1.35 @@ -215,7 +220,8 @@
    1.36    MLTEXT="$MLTEXT; Isabelle_Process.init_fifos \"${FIFOS[0]}\" \"${FIFOS[1]}\";"
    1.37  else
    1.38    ISABELLE_PROCESS_OPTIONS="$ISABELLE_TMP/options"
    1.39 -  "$ISABELLE_TOOL" options -x "$ISABELLE_PROCESS_OPTIONS" || fail "Failed to retrieve options"
    1.40 +  "$ISABELLE_TOOL" options -x "$ISABELLE_PROCESS_OPTIONS" -- "${SYSTEM_OPTIONS[@]}" || \
    1.41 +    fail "Failed to retrieve Isabelle system options"
    1.42    if [ "$INPUT" != RAW_ML_SYSTEM -a "$INPUT" != RAW ]; then
    1.43      MLTEXT="Options.load_default () handle _ => exit 2; $MLTEXT"
    1.44    fi