-
Notifications
You must be signed in to change notification settings - Fork 1
/
lanzador.sh
executable file
·43 lines (35 loc) · 981 Bytes
/
lanzador.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
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
function quit {
kill $(ps | grep 'wish' | awk '{print $1}')
kill $(ps | grep 'xterm' | awk '{print $1}')
exit 0 > /dev/null 2>&1
}
printf "${YELLOW}[INFO]${NC}: Lanzando bsvc ... \n"
bsvc practica.setup &
printf "${YELLOW}[INFO]${NC}: Compilando ... "
salida=$(68kasm -l es_int.s 2>&1)
if [[ ! $(echo -e $salida | grep "No errors detected") ]]; then
printf "${RED} ERROR ${NC}\n"
echo -e "$salida"
else
printf "${GREEN} OK ${NC}\n"
fi
printf "${YELLOW}[INFO]${NC}: Presiona ENTER para compilar o pulsa E y despues ENTER para salir "
while true ; do
read -e input
if [[ "$input" == "e" ]] ; then
quit;
fi
printf "${YELLOW}[INFO]${NC}: Compilando ... "
salida=$(68kasm -l es_int.s 2>&1)
if [[ ! $(echo -e $salida | grep "No errors detected") ]]; then
printf "${RED} ERROR ${NC}"
echo -e "$salida"
else
printf "${GREEN} OK ${NC}"
fi
done