-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjcompilo.sh
More file actions
executable file
·31 lines (27 loc) · 896 Bytes
/
jcompilo.sh
File metadata and controls
executable file
·31 lines (27 loc) · 896 Bytes
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
#!/bin/sh
set -e
JAVA_VERSION=8
JAVA_OPTS="-server -XX:+TieredCompilation -Djava.net.useSystemProxies=true ${JAVA_OPTS}"
BUILD_NUMBER=${BUILD_NUMBER-dev.build}
version=2.37
artifact=jcompilo
group=com/googlecode/${artifact}
repo=repo.bodar.com
dir=lib/
jar=${dir}${artifact}.jar
pack=${dir}${artifact}.pack.gz
url=http://${repo}/${group}/${artifact}/${version}/${artifact}-${version}
remote_file=${url}.pack.gz
remote_sh=${url}.sh
type -t setjava > /dev/null && setjava -q ${JAVA_VERSION} || if [ -n "${JAVA_HOME}" ]; then PATH=${JAVA_HOME}/bin:${PATH}; fi
if [ "$1" = "update" ]; then
rm ${jar} ${pack}
fi
if [ ! -f ${jar} ]; then
mkdir -p ${dir}
wget -O ${pack} ${remote_file} || curl -o ${pack} ${remote_file}
unpack200 ${pack} ${jar}
rm ${pack}
#wget -O $0 ${remote_sh} || curl -o $0 ${remote_sh}
fi
exec java -showversion -Dbuild.number=${BUILD_NUMBER} ${JAVA_OPTS} -jar ${jar} $*