author | wenzelm |
Fri, 16 Jul 2021 12:11:13 +0200 | |
changeset 74011 | 1d366486a812 |
parent 73993 | 3868fed3c34b |
permissions | -rwxr-xr-x |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
1 |
#!/usr/bin/env bash |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
2 |
# |
27629 | 3 |
# Administrative build for Isabelle source distribution. |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
4 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
5 |
## directory layout |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
6 |
|
34282
549969a7f582
simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
31831
diff
changeset
|
7 |
if [ -z "$ISABELLE_HOME" ]; then |
73705
ac07f6be27ea
avoid unexpected output+behaviour when CDPATH is set
kleing
parents:
71367
diff
changeset
|
8 |
unset CDPATH |
34282
549969a7f582
simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
31831
diff
changeset
|
9 |
ISABELLE_HOME="$(cd "$(dirname "$0")"; cd "$(pwd -P)"; cd ..; pwd)" |
549969a7f582
simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
31831
diff
changeset
|
10 |
ISABELLE_TOOL="$ISABELLE_HOME/bin/isabelle" |
549969a7f582
simplified build/bootstrap of Isabelle/Scala components -- avoid make;
wenzelm
parents:
31831
diff
changeset
|
11 |
fi |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
12 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
13 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
14 |
## diagnostics |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
15 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
16 |
PRG="$(basename "$0")" |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
17 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
18 |
function usage() |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
19 |
{ |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
20 |
cat <<EOF |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
21 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
22 |
Usage: $PRG [MODULES] |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
23 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
24 |
Produce Isabelle distribution modules from current repository sources. |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
25 |
The MODULES list may contain any of the following: |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
26 |
|
58791 | 27 |
jars Isabelle/Scala |
43280 | 28 |
jars_fresh fresh build of jars |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
29 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
30 |
EOF |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
31 |
exit 1 |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
32 |
} |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
33 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
34 |
function fail() |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
35 |
{ |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
36 |
echo "$1" >&2 |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
37 |
exit 2 |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
38 |
} |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
39 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
40 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
41 |
## process command line |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
42 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
43 |
[ "$#" -eq 0 ] && usage |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
44 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
45 |
MODULES="$@"; shift "$#" |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
46 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
47 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
48 |
## modules |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
49 |
|
73987
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
50 |
function build_setup () |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
51 |
{ |
73987
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
52 |
rm -rf \ |
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
53 |
"$ISABELLE_HOME/lib/classes/Pure.jar" \ |
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
54 |
"$ISABELLE_HOME/lib/classes/Pure.shasum" \ |
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
55 |
"$ISABELLE_HOME/src/Tools/jEdit/dist" |
73993 | 56 |
env ISABELLE_SETUP_CLASSPATH_SKIP=true "$ISABELLE_TOOL" java isabelle.setup.Setup "$@" |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
57 |
} |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
58 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
59 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
60 |
## main |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
61 |
|
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
62 |
for MODULE in $MODULES |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
63 |
do |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
64 |
case $MODULE in |
73987
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
65 |
jars) build_setup build;; |
fc363a3b690a
build.props for isabelle.jar, including isabelle.jedit;
wenzelm
parents:
73705
diff
changeset
|
66 |
jars_fresh) build_setup build_fresh;; |
27628
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
67 |
*) fail "Bad module $MODULE" |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
68 |
esac |
901656b3205d
Administrative build -- finish Isabelle source distribution.
wenzelm
parents:
diff
changeset
|
69 |
done |