-
Notifications
You must be signed in to change notification settings - Fork 0
/
scala - Copie.sh
63 lines (50 loc) · 1.64 KB
/
scala - Copie.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
#!/bin/bash
echo "Let the installation begins!!"
# Install Java
if type -p java; then
echo Found java executable in PATH
_java=java
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
echo found java executable in JAVA_HOME
_java="$JAVA_HOME/bin/java"
else
echo "Install Java..."
sudo apt-get update
sudo apt-get -y install default-jre
sudo apt-get -y install default-jdk
fi
if [[ "$_java" ]]; then
version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
if [[ "$version" > "1.8.0_121" ]]; then
clear
echo "Java version $version is correclty installed"
else
echo "Java should be at least of version 1.8.0_121 to continue the installation"
echo "The actual version is $version"
echo "Install Java..."
sudo apt-get update
sudo apt-get -y install default-jre
sudo apt-get -y install default-jdk
fi
fi
# Install sbt
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' sbt |grep "install ok installed")
if [ "" == "$PKG_OK" ]; then
echo "Install sbt..."
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 642AC823
sudo apt-get -y update
sudo apt-get -y install sbt
clear
else
echo "Sbt is already installed"
fi
PKG_OK=$(dpkg-query -W --showformat='${Status}\n' git |grep "install ok installed")
if [ "" == "$PKG_OK" ]; then
echo "Install git..."
sudo apt-get git
clear
else
echo "Git is already installed"
fi
git clone https://github.com/laurianemollier/software-factory-website.git