-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.sh
executable file
·34 lines (27 loc) · 965 Bytes
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# OS specific support. $var _must_ be set to either true or false.
cygwin=false
darwin=false
os400=false
hpux=false
case "`uname`" in
CYGWIN*) cygwin=true;;
Darwin*) darwin=true;;
OS400*) os400=true;;
HP-UX*) hpux=true;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched
$cygwin && [ -z "$JAVA_HOME" ] && export JAVA_HOME=/usr/jdk/jdk-10
$darwin && [ -z "$JAVA_HOME" ] && JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk-10.jdk/Contents/Home/"
export java=$JAVA_HOME/bin/java
export javac=$JAVA_HOME/bin/javac
rm -fr bootstrap
mkdir bootstrap
$javac --module-source-path src/main/java \
-d bootstrap/modules/ \
--module-path deps \
$(find src/main/java/ -name "*.java")
$java --module-path bootstrap/modules:deps \
--add-modules jdk.unsupported \
--upgrade-module-path bootstrap/modules \
--module com.github.forax.pro.bootstrap/com.github.forax.pro.bootstrap.Bootstrap