-
Notifications
You must be signed in to change notification settings - Fork 0
/
desinstaller.sh
159 lines (109 loc) · 4.36 KB
/
desinstaller.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/usr/bash
green=`tput setaf 2`
bold=`tput bold`
reset=`tput sgr0`
echo "${green}${bold}\n********************************************************************************${reset}"
echo "${green}${bold}*****************************DESINSTALADOR*****************************************${reset}"
echo "${green}${bold}********************************************************************************${reset}"
# Loop through arguments and process them
for arg in "$@"
do
case $arg in
--qt)
shift
echo "${green}${bold}Desinstalando las dependencias de qt...${reset}"
echo "${green}Desinstalando 'qt5'...${reset}"
sudo apt-get remove qt5-default -y
echo "${green}Desinstalando 'libqt5multimedia5-plugnins'...${reset}"
sudo apt-get remove libqt5multimedia5-plugins -y
;;
--yaml)
shift
echo "${green}${bold}Desinstalando las dependencias de yaml-cpp...${reset}"
sudo apt-get remove libyaml-cpp-dev -y
;;
--sdl)
shift
echo "${green}${bold}Desinstalando las dependencias de sdl2...${reset}"
echo "${green}Desinstalando 'libsdl2-dev'...${reset}"
sudo apt-get remove libsdl2-dev -y
echo "${green}Desinstalando 'libsdl2-image-dev'...${reset}"
sudo apt-get remove libsdl2-image-dev -y
echo "${green}Desinstalando 'libsdl2-gfx-dev'...${reset}"
sudo apt-get remove libsdl2-gfx-dev -y
echo "${green}Desinstalando 'libsdl2-mixer-dev'...${reset}"
sudo apt-get remove libsdl2-mixer-dev -y
;;
--cpp)
shift
echo "${green}${bold}Desinstalando las dependencias cpp...${reset}"
echo "${green}Desinstalando 'clang'...${reset}"
sudo apt-get remove clang -y
echo "${green}Desinstalando 'make'...${reset}"
sudo apt-get remove make -y
echo "${green}Desinstalando 'cmake'...${reset}"
sudo apt-get remove cmake -y
echo "${green}Desinstalando 'build-essential'...${reset}"
sudo apt-get remove build-essential -y
;;
--repo)
shift
echo "${green}${bold}Borrando el repositorio...${reset}"
cd ..
rm 7542_TpFinal
;;
--cs2d)
shift
echo "${green}${bold}Desinstalando CS2D...${reset}"
sudo rm -rf /var/cs2d
sudo rm /usr/bin/cs2d
sudo rm /usr/bin/cs2d_editor
sudo rm /usr/bin/cs2d_server
;;
--box2d)
shift
echo "${green}${bold}Desinstalando BOX2D...${reset}"
sudo rm -rf /usr/local/include/box2d
sudo rm -rf /usr/local/lib/cmake/box2d/
sudo rm /usr/local/lib/libbox2d.a
;;
--all)
shift
echo "${green}Desinstalando 'qt5'...${reset}"
sudo apt-get remove qt5-default -y
echo "${green}Desinstalando 'libqt5multimedia5-plugnins'...${reset}"
sudo apt-get remove libqt5multimedia5-plugins -y
echo "${green}Desinstalando las dependencias de yaml-cpp...${reset}"
sudo apt-get remove libyaml-cpp-dev -y
echo "${green}Desinstalando 'libsdl2-dev'...${reset}"
sudo apt-get remove libsdl2-dev -y
echo "${green}Desinstalando 'libsdl2-image-dev'...${reset}"
sudo apt-get remove libsdl2-image-dev -y
echo "${green}Desinstalando 'libsdl2-gfx-dev'...${reset}"
sudo apt-get remove libsdl2-gfx-dev -y
echo "${green}Desinstalando 'libsdl2-mixer-dev'...${reset}"
sudo apt-get remove libsdl2-mixer-dev -y
echo "${green}Desinstalando 'libsdl2-ttf-dev'...${reset}"
sudo apt-get remove libsdl2-mixer-dev -y
echo "${green}Desinstalando 'clang'...${reset}"
sudo apt-get remove clang -y
echo "${green}Desinstalando 'make'...${reset}"
sudo apt-get remove make -y
echo "${green}Desinstalando 'cmake'...${reset}"
sudo apt-get remove cmake -y
echo "${green}Desinstalando 'build-essential'...${reset}"
sudo apt-get remove build-essential -y
cd ..
rmdir 7542_TpFinal
echo "${green}${bold}Desinstalando CS2D...${reset}"
sudo rm -rf /var/cs2d
sudo rm /usr/bin/cs2d
sudo rm /usr/bin/cs2d_editor
sudo rm /usr/bin/cs2d_server
echo "${green}${bold}Desinstalando BOX2D...${reset}"
sudo rm -rf /usr/local/include/box2d
sudo rm -rf /usr/local/lib/cmake/box2d/
sudo rm /usr/local/lib/libbox2d.a
;;
esac
done