-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile.sh
52 lines (46 loc) · 1.37 KB
/
compile.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
#!/bin/env bash
mainmenu () {
echo "----------------------------------------------"
echo "- Entrenamos.uy compiling utility -"
echo "----------------------------------------------"
echo "- Please select an option -"
echo "- 1. Compile All Components -"
echo "- 2. Compile ServidorCentral -"
echo "- 3. Compile ServidorWeb -"
echo "- 4. Exit -"
echo "----------------------------------------------"
read -n 1 -p "Input Selection:" mainmenuinput
if [ "$mainmenuinput" = "1" ]; then
installAll
elif [ "$mainmenuinput" = "2" ]; then
installCentral
elif [ "$mainmenuinput" = "3" ]; then
installWeb
elif [ "$mainmenuinput" = "4" ]; then
exit
else
clear
mainmenu
fi
}
installWeb () {
echo "Compiling ServidorWeb..."
cd servidorWeb
ant clean compile war
cd ..
cp servidorWeb/dist/ServidorWeb.war ./web.war
}
installCentral (){
echo "Compiling ServidorCentral..."
cd servidorCentral
mvn clean install
cd ..
cp servidorCentral/target/servidorCentral-1.0-jar-with-dependencies.jar ./servidor.jar
cp -r servidorCentral/assets ./assets
}
installAll () {
installCentral
installWeb
}
mainmenu
echo "Compilation successfull."