-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_tools.sh
73 lines (59 loc) · 1.78 KB
/
install_tools.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
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
set -x
#
# install swig
#
swigExists=`swig -version`
if [ -z "$swigExists" ]; then
sudo apt-get update
sudo apt-get -y install swig
fi
#
# install default jre to have a java compiler (javac)
#
jreExists=`javac -version`
if [ -z "$jreExists" ]; then
sudo apt-get -y install default-jdk
fi
ls ~/jdk1.8.0_281/bin
mydir=$PWD
#
# install java (zulu)
#
if [ -d ~/jdk1.8.0_281/bin ]
then
echo "JDK exist."
#
# build otgc (in the otgc-linux folder)
#
export PATH=~/jdk1.8.0_281/bin:$PATH
export LD_LIBRARY_PATH=./lib/jni
export JAVA_HOME=~/jdk1.8.0_281
else
echo "Error: Directory does not exist: installing Azul JDK."
cd ~
homedir=$PWD
echo ${homedir}
FILE=${homedir}/zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64.tar.gz
if [ -f "$FILE" ]; then
echo "$FILE exists."
else
echo "downloading $FILE"
wget https://cdn.azul.com/zulu/bin/zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64.tar.gz
tar -xvf zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64.tar.gz
fi
#wget https://www.azul.com/downloads/?version=java-8-lts&package=jdk-fx
#wget https://cdn.azul.com/zulu/bin/zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64.tar.gz
#tar -xvf zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64.tar.gz
export PATH=${homedir}/zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64/bin:$PATH
cd $mydir
${homedir}/zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64/bin/java -version
#export JAVA_HOME=~/zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64/bin
export JAVA_HOME=${homedir}/zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64
# overwrite the existing JAVA environment
ls $JAVA_HOME
ls $JAVA_HOME_11_X64
export JAVA_HOME_11_X64=$JAVA_HOME
fi
export PATH=${homedir}/zulu8.54.0.21-ca-fx-jdk8.0.292-linux_x64/bin:$PATH
export JAVA_HOME_11_X64=$JAVA_HOME