-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·60 lines (44 loc) · 1.12 KB
/
deploy.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
#!/bin/bash
PROJECT_PATH=/home/utnso/tp-2022-1c-FASE_A
TESTING_PATH=/home/utnso/kiss-pruebas
SWAP_PATH=/home/utnso/swap
COMMON_PATH=/home/utnso/so-commons-library
if [ "$1" == "" ]; then
echo "Error de ejecucion: ./deploy.sh <install | uninstall>"
exit 1
fi
if [ "$1" == "install" ]; then
echo -e "\n\nInstalling commons libraries...\n\n"
cd $HOME
COMMONS="so-commons-library"
rm -rf $COMMONS
git clone "https://github.com/sisoputnfrba/${COMMONS}.git" $COMMONS
cd $COMMONS
make uninstall
make install
echo -e "\n\n **** Descargando Pruebas... ****\n\n"
cd $HOME
git clone "https://github.com/sisoputnfrba/kiss-pruebas"
mkdir -p $SWAP_PATH
cd $PROJECT_PATH
PROJECTS=(Consola Kernel CPU Memoria)
echo -e "\n\nBuilding projects..."
for i in "${PROJECTS[@]}"
do
echo -e "\n\nBuilding ${i}\n\n"
cd $i
make clean
make all
cd $PROJECT_PATH
done
echo -e "\n\n ***** Se instalo todo. Ejecutar modulos *****\n"
else
echo -e "\n\n **** Desinstalando todo... ****\n\n"
cd $COMMON_PATH
make uninstall
cd $HOME
rm -rf $COMMON_PATH
rm -rf $TESTING_PATH
rm -rf $SWAP_PATH
rm -rf $PROJECT_PATH
fi