2019-04-11 14:51:33 +08:00
|
|
|
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
###########################################################
|
|
|
|
# UTILS
|
|
|
|
###########################################################
|
|
|
|
|
2020-09-27 19:03:51 +08:00
|
|
|
export DEBIAN_FRONTEND=noninteractive
|
2019-04-11 14:51:33 +08:00
|
|
|
apt-get update
|
2020-09-27 19:03:51 +08:00
|
|
|
apt-get install --no-install-recommends -y tzdata ca-certificates net-tools libxml2-utils git curl libudev1 libxml2-utils iptables iproute2 jq unzip
|
|
|
|
ln -fs /usr/share/zoneinfo/UTC /etc/localtime
|
|
|
|
dpkg-reconfigure --frontend noninteractive tzdata
|
2019-04-11 14:51:33 +08:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2020-12-17 18:36:42 +08:00
|
|
|
curl https://raw.githubusercontent.com/spring-io/concourse-java-scripts/v0.0.4/concourse-java.sh > /opt/concourse-java.sh
|
2019-04-11 14:51:33 +08:00
|
|
|
|
2021-03-23 21:32:47 +08:00
|
|
|
curl --output /opt/concourse-release-scripts.jar https://repo.spring.io/release/io/spring/concourse/releasescripts/concourse-release-scripts/0.3.2/concourse-release-scripts-0.3.2.jar
|
2019-04-11 14:51:33 +08:00
|
|
|
|
|
|
|
###########################################################
|
|
|
|
# JAVA
|
|
|
|
###########################################################
|
2020-12-17 18:20:23 +08:00
|
|
|
JDK_URL=$( ./get-jdk-url.sh $1 )
|
2019-04-11 14:51:33 +08:00
|
|
|
|
|
|
|
mkdir -p /opt/openjdk
|
|
|
|
cd /opt/openjdk
|
|
|
|
curl -L ${JDK_URL} | tar zx --strip-components=1
|
|
|
|
test -f /opt/openjdk/bin/java
|
|
|
|
test -f /opt/openjdk/bin/javac
|