equal
deleted
inserted
replaced
21 echo |
21 echo |
22 echo "Usage: $PRG [OPTIONS] [INPUT] [OUTPUT]" |
22 echo "Usage: $PRG [OPTIONS] [INPUT] [OUTPUT]" |
23 echo |
23 echo |
24 echo " Options are:" |
24 echo " Options are:" |
25 echo " -I startup Isar interaction mode" |
25 echo " -I startup Isar interaction mode" |
|
26 echo " -c tell ML system to compress output image" |
26 echo " -e MLTEXT pass MLTEXT to the ML session" |
27 echo " -e MLTEXT pass MLTEXT to the ML session" |
27 echo " -m MODE add print mode for output" |
28 echo " -m MODE add print mode for output" |
28 echo " -q non-interactive session" |
29 echo " -q non-interactive session" |
29 echo " -r open heap file read-only" |
30 echo " -r open heap file read-only" |
30 echo " -u pass 'use\"ROOT.ML\";' to the ML session" |
31 echo " -u pass 'use\"ROOT.ML\";' to the ML session" |
47 |
48 |
48 ## process command line |
49 ## process command line |
49 |
50 |
50 # options |
51 # options |
51 |
52 |
|
53 COMPRESS="" |
52 MLTEXT="" |
54 MLTEXT="" |
53 MODES="" |
55 MODES="" |
54 TERMINATE="" |
56 TERMINATE="" |
55 READONLY="" |
57 READONLY="" |
56 NOWRITE="" |
58 NOWRITE="" |
57 |
59 |
58 while getopts "Ie:m:qruw" OPT |
60 while getopts "Ice:m:qruw" OPT |
59 do |
61 do |
60 case "$OPT" in |
62 case "$OPT" in |
61 I) |
63 I) |
62 MLTEXT="$MLTEXT Isar.main();" |
64 MLTEXT="$MLTEXT Isar.main();" |
|
65 ;; |
|
66 c) |
|
67 COMPRESS=true |
63 ;; |
68 ;; |
64 e) |
69 e) |
65 MLTEXT="$MLTEXT $OPTARG" |
70 MLTEXT="$MLTEXT $OPTARG" |
66 ;; |
71 ;; |
67 m) |
72 m) |
175 |
180 |
176 ML_SYSTEM_BASE=$(echo $ML_SYSTEM | cut -f1 -d-) |
181 ML_SYSTEM_BASE=$(echo $ML_SYSTEM | cut -f1 -d-) |
177 |
182 |
178 [ -n "$MODES" ] && MLTEXT="print_mode := [$MODES]; $MLTEXT" |
183 [ -n "$MODES" ] && MLTEXT="print_mode := [$MODES]; $MLTEXT" |
179 |
184 |
180 export INFILE OUTFILE MLTEXT TERMINATE NOWRITE ISABELLE_TMP |
185 export INFILE OUTFILE COMPRESS MLTEXT TERMINATE NOWRITE ISABELLE_TMP |
181 |
186 |
182 if [ -f $ISABELLE_HOME/lib/scripts/run-$ML_SYSTEM ]; then |
187 if [ -f $ISABELLE_HOME/lib/scripts/run-$ML_SYSTEM ]; then |
183 $ISABELLE_HOME/lib/scripts/run-$ML_SYSTEM |
188 $ISABELLE_HOME/lib/scripts/run-$ML_SYSTEM |
184 else |
189 else |
185 $ISABELLE_HOME/lib/scripts/run-$ML_SYSTEM_BASE |
190 $ISABELLE_HOME/lib/scripts/run-$ML_SYSTEM_BASE |