equal
deleted
inserted
replaced
14 echo |
14 echo |
15 echo "Usage: isabelle $PRG [OPTIONS] [MORE_OPTIONS ...]" |
15 echo "Usage: isabelle $PRG [OPTIONS] [MORE_OPTIONS ...]" |
16 echo |
16 echo |
17 echo " Options are:" |
17 echo " Options are:" |
18 echo " -b include \$ISABELLE_BUILD_OPTIONS" |
18 echo " -b include \$ISABELLE_BUILD_OPTIONS" |
|
19 echo " -g OPTION get value of OPTION" |
19 echo " -l list options" |
20 echo " -l list options" |
20 echo " -x FILE export options to FILE in YXML format" |
21 echo " -x FILE export options to FILE in YXML format" |
21 echo |
22 echo |
22 echo " Report Isabelle system options, augmented by MORE_OPTIONS given as" |
23 echo " Report Isabelle system options, augmented by MORE_OPTIONS given as" |
23 echo " arguments NAME=VAL or NAME." |
24 echo " arguments NAME=VAL or NAME." |
33 |
34 |
34 |
35 |
35 ## process command line |
36 ## process command line |
36 |
37 |
37 declare -a BUILD_OPTIONS=() |
38 declare -a BUILD_OPTIONS=() |
|
39 GET_OPTION="" |
38 LIST_OPTIONS="false" |
40 LIST_OPTIONS="false" |
39 EXPORT_FILE="" |
41 EXPORT_FILE="" |
40 |
42 |
41 while getopts "blx:" OPT |
43 while getopts "bg:lx:" OPT |
42 do |
44 do |
43 case "$OPT" in |
45 case "$OPT" in |
44 b) |
46 b) |
45 eval "BUILD_OPTIONS=($ISABELLE_BUILD_OPTIONS)" |
47 eval "BUILD_OPTIONS=($ISABELLE_BUILD_OPTIONS)" |
|
48 ;; |
|
49 g) |
|
50 GET_OPTION="$OPTARG" |
46 ;; |
51 ;; |
47 l) |
52 l) |
48 LIST_OPTIONS="true" |
53 LIST_OPTIONS="true" |
49 ;; |
54 ;; |
50 x) |
55 x) |
56 esac |
61 esac |
57 done |
62 done |
58 |
63 |
59 shift $(($OPTIND - 1)) |
64 shift $(($OPTIND - 1)) |
60 |
65 |
61 [ "$LIST_OPTIONS" = "false" -a -z "$EXPORT_FILE" ] && usage |
66 [ -z "$GET_OPTION" -a "$LIST_OPTIONS" = "false" -a -z "$EXPORT_FILE" ] && usage |
62 |
67 |
63 |
68 |
64 ## main |
69 ## main |
65 |
70 |
66 isabelle_admin_build jars || exit $? |
71 isabelle_admin_build jars || exit $? |
67 |
72 |
68 exec "$ISABELLE_TOOL" java isabelle.Options "$EXPORT_FILE" "${BUILD_OPTIONS[@]}" "$@" |
73 exec "$ISABELLE_TOOL" java isabelle.Options \ |
|
74 "$GET_OPTION" "$EXPORT_FILE" "${BUILD_OPTIONS[@]}" "$@" |
69 |
75 |