equal
deleted
inserted
replaced
15 echo "Usage: isabelle $PRG [OPTIONS] [SESSIONS ...]" |
15 echo "Usage: isabelle $PRG [OPTIONS] [SESSIONS ...]" |
16 echo |
16 echo |
17 echo " Options are:" |
17 echo " Options are:" |
18 echo " -a all sessions" |
18 echo " -a all sessions" |
19 echo " -b build target images" |
19 echo " -b build target images" |
|
20 echo " -d DIR additional session directory with ROOT file" |
20 echo " -l list sessions only" |
21 echo " -l list sessions only" |
21 echo " -o OPTION override session configuration OPTION (via NAME=VAL or NAME)" |
22 echo " -o OPTION override session configuration OPTION (via NAME=VAL or NAME)" |
22 echo |
23 echo |
23 echo " Build and manage Isabelle sessions, depending on implicit" |
24 echo " Build and manage Isabelle sessions, depending on implicit" |
24 echo " ISABELLE_BUILD_OPTIONS=\"$ISABELLE_BUILD_OPTIONS\"" |
25 echo " ISABELLE_BUILD_OPTIONS=\"$ISABELLE_BUILD_OPTIONS\"" |
42 |
43 |
43 ALL_SESSIONS=false |
44 ALL_SESSIONS=false |
44 BUILD_IMAGES=false |
45 BUILD_IMAGES=false |
45 LIST_ONLY=false |
46 LIST_ONLY=false |
46 |
47 |
|
48 declare -a MORE_DIRS=() |
47 eval "declare -a BUILD_OPTIONS=($ISABELLE_BUILD_OPTIONS)" |
49 eval "declare -a BUILD_OPTIONS=($ISABELLE_BUILD_OPTIONS)" |
48 |
50 |
49 while getopts "ablo:" OPT |
51 while getopts "abd:lo:" OPT |
50 do |
52 do |
51 case "$OPT" in |
53 case "$OPT" in |
52 a) |
54 a) |
53 ALL_SESSIONS="true" |
55 ALL_SESSIONS="true" |
54 ;; |
56 ;; |
55 b) |
57 b) |
56 BUILD_IMAGES="true" |
58 BUILD_IMAGES="true" |
|
59 ;; |
|
60 d) |
|
61 MORE_DIRS["${#MORE_DIRS[@]}"]="$OPTARG" |
57 ;; |
62 ;; |
58 l) |
63 l) |
59 LIST_ONLY="true" |
64 LIST_ONLY="true" |
60 ;; |
65 ;; |
61 o) |
66 o) |
73 ## main |
78 ## main |
74 |
79 |
75 [ -e "$ISABELLE_HOME/Admin/build" ] && { "$ISABELLE_HOME/Admin/build" jars || exit $?; } |
80 [ -e "$ISABELLE_HOME/Admin/build" ] && { "$ISABELLE_HOME/Admin/build" jars || exit $?; } |
76 |
81 |
77 exec "$ISABELLE_TOOL" java isabelle.Build \ |
82 exec "$ISABELLE_TOOL" java isabelle.Build \ |
78 "$ALL_SESSIONS" "$BUILD_IMAGES" "$LIST_ONLY" "${BUILD_OPTIONS[@]}" $'\n' "$@" |
83 "$ALL_SESSIONS" "$BUILD_IMAGES" "$LIST_ONLY" \ |
|
84 "${MORE_DIRS[@]}" $'\n' "${BUILD_OPTIONS[@]}" $'\n' "$@" |