Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation script #4893

Merged
merged 1 commit into from
Jan 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions scripts/install_java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
# echo 'export JAVA_HOME=/Library/Java/JavaVirtualMachines/<ENTER_NEW_JDK>/Contents/Home' >>~/.bash_profile
# echo 'export PATH=$JAVA_HOME/bin:$PATH' >>~/.bash_profile
# source ~/.bash_profile

set -e

unameOut="$(uname -s)"
case "${unameOut}" in
Linux*)
Linux*)
JAVA_HOME=/usr/lib/jvm/openjdk-10.0.2
JDK_FILENAME=openjdk-10.0.2_linux-x64_bin.tar.gz
JDK_URL=https://download.java.net/java/GA/jdk10/10.0.2/19aef61b38124481863b1413dce1855f/13/openjdk-10.0.2_linux-x64_bin.tar.gz
Expand All @@ -27,7 +27,7 @@ case "${unameOut}" in
osInfo[/etc/SuSE-release]=zypp
osInfo[/etc/debian_version]=apt-get

for f in ${!osInfo[@]}
for f in "${!osInfo[@]}"
do
if [[ -f $f ]]; then
PACKAGE_MANAGER=${osInfo[$f]}
Expand Down Expand Up @@ -74,9 +74,10 @@ case "${unameOut}" in
fi

echo export JAVA_HOME=$JAVA_HOME >>~/.bash_profile
echo export PATH=$JAVA_HOME/bin:$PATH >>~/.bash_profile
source ~/.bash_profile
echo export PATH=$JAVA_HOME/bin:"$PATH" >>~/.bash_profile
source "$HOME/.bash_profile"
;;
*) machine="UNKNOWN:${unameOut}"
*)
esac
java -version