-
Notifications
You must be signed in to change notification settings - Fork 16
/
build-jmc.sh
executable file
·63 lines (52 loc) · 1.04 KB
/
build-jmc.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
set -x
# define build environment
BUILD_DIR=`pwd`
pushd `dirname $0`
SCRIPT_DIR=`pwd`
popd
TOOL_DIR="$BUILD_DIR/tools"
JDK_DIR=$BUILD_DIR/$JDKBASE
# version is either jmc or jmc7
JMC_VERSION=jmc7
JMC_REPO=https://hg.openjdk.java.net/jmc/$JMC_VERSION
JMC_BUILD_DIR="$BUILD_DIR/$JMC_VERSION"
JMC_JDK_VERSION=8
clone_jmc() {
cd `dirname $JMC_BUILD_DIR`
if [ ! -d "$JMC_BUILD_DIR" ] ; then
hg clone $JMC_REPO $JMC_BUILD_DIR
else
cd "$JMC_BUILD_DIR"
hg pull -u
fi
}
start_jmc_background() {
cd "$JMC_BUILD_DIR"
cd releng/third-party
mvn p2:site
mvn jetty:run&
}
build_jmc() {
cd "$JMC_BUILD_DIR"
cd core
#mvn clean install
mvn install
cd ..
mvn package
}
clean_jmc() {
cd "$JMC_BUILD_DIR"
mvn clean
cd core
mvn clean
#rm -fr $HOME/.m2/repository
}
. "$SCRIPT_DIR/tools.sh" "$TOOL_DIR" mvn mercurial bootstrap_jdk$JMC_JDK_VERSION
export JDK_HOME="$JDK_DIR"
export PATH="$JDK_HOME/bin:$PATH"
clone_jmc
#clean_jmc
start_jmc_background
sleep 5
build_jmc