-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·68 lines (55 loc) · 1.45 KB
/
setup.sh
File metadata and controls
executable file
·68 lines (55 loc) · 1.45 KB
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
#!/bin/bash
# Be nice and add for each OS
#if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# echo "Linux"
#elif [[ "$OSTYPE" == "darwin"* ]]; then
# echo "Mac"
#elif [[ "$OSTYPE" == "cygwin" ]]; then
# echo "Windows Cygwin"
#elif [[ "$OSTYPE" == "msys" ]]; then
# echo "Windows 2"
#else
# echo "The operating system $OSTYPE is not supported..."
# exit 1
#fi
# Check if it has maven
mvn -v
if [ "${?}" -gt 0 ]; then
echo "Error! Maven not found, install it to proceed..."
exit 1
fi
# Check if it has git
git --version
if [ "${?}" -gt 0 ]; then
echo "Error! git not found, install it to proceed..."
exit 1
fi
# Detect if java exists
java -version
if [ "${?}" -gt 0 ]; then
echo "Error! java not found, install java 1.8 to proceed..."
exit 1
fi
# -----------------------------------------------------------------------------
# Download the jpf from the git repository
cd ..
dir="jpf-backup/"
if [ -d "$DIR" ]; then
git clone https://github.com/pcanelas/jpf-backup.git
fi
# Set the jpf site configuration
echo "Need permissions to generate jpf site properties..."
sudo mkdir /home/.jpf
sudo echo "
# JPF site configuration
jpf-core = $PWD/jpf-backup/jpf-core
jpf-nhandler = $PWD/jpf-backup/jpf-nhandler
jpf-symbc = $PWD/jpf-backup/jpf-symbc
extensions=\${jpf-core},\${jpf-nhandler},\${jpf-symbc}
# Automatic generated jpf site properties
" > /home/.jpf/site.properties
cd -
# Cleans installs the maven dependencies
cd liquidjava-umbrella
mvn clean install
cd ..