forked from r-arek/test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script
executable file
·48 lines (42 loc) · 1.83 KB
/
script
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
#!/usr/bin/env bash
set -o errexit
set -o xtrace
main() {
# local JAVA_VERSION
# JAVA_VERSION=15
# sudo apt-get update -yqq
# PACKAGE="adoptopenjdk-${JAVA_VERSION}-hotspot"
# wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
# sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
# sudo apt-get update -yqq
# sudo apt-get -yqq --no-install-suggests --no-install-recommends install "$PACKAGE" || true
# export JAVA_HOME=/usr/local/lib/jvm/adoptopenjdk-${JAVA_VERSION}-hotspot
# export PATH="$JAVA_HOME/bin:$PATH"
# sudo update-java-alternatives -s "$PACKAGE"*
# local JAVA_VERSION
# JAVA_VERSION="15"
# sudo apt-get update -yqq
# if [[ "$JAVA_VERSION" == "8" ]]; then
# JAVA_VERSION="1.8.0"
# fi
# PACKAGE="java-${JAVA_VERSION}-amazon-corretto-jdk"
# wget -O- https://apt.corretto.aws/corretto.key | sudo apt-key add -
# sudo add-apt-repository 'deb https://apt.corretto.aws stable main'
# sudo apt-get update -yqq
# sudo apt-get -yqq --no-install-suggests --no-install-recommends install "$PACKAGE" || true
# #export JAVA_HOME=/usr/lib/jvm/java-${JAVA_VERSION}-amazon-corretto-jdk
# #export PATH="$JAVA_HOME/bin:$PATH"
# sudo update-java-alternatives -s "$PACKAGE"*
local JAVA_VERSION
JAVA_VERSION=13
sudo apt-get update -yqq
PACKAGE="bellsoft-java${JAVA_VERSION}"
wget -qO - https://download.bell-sw.com/pki/GPG-KEY-bellsoft | sudo apt-key add -
sudo add-apt-repository 'deb [arch='$TRAVIS_CPU_ARCH'] https://apt.bell-sw.com/ stable main'
sudo apt-get update -yqq
sudo apt-get -yqq --no-install-suggests --no-install-recommends install "$PACKAGE" || true
export JAVA_HOME=/usr/lib/jvm/bellsoft-java${JAVA_VERSION}-${TRAVIS_CPU_ARCH}
export PATH="$JAVA_HOME/bin:$PATH"
sudo update-java-alternatives -s "$PACKAGE"*
}
main "$@"