-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
32 lines (30 loc) · 989 Bytes
/
main.c
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
#include <stdio.h>
#include <unistd.h>
#include "./include/cmdHandler.h"
#include "./include/execScript.h"
void printPresentacion();
int main(int argc,char *argv[])
{
if(readScript(argv[1])){
//si se puedo ejecutar el scrip termino
}else { //si no abro el BG_Shell
printPresentacion();
char *comand;
while (1) {
comand = getLine();
cmdHandler(comand);
}
}
return 0;
}
void printPresentacion(){
clear();
printf("\n\t\x1b[43m*******************************************");
printf("\n\t**\x1b[0m \x1b[42mBG_Shell\x1b[0m \x1b[43m**");
printf("\n\t**\x1b[0m Este shell fue creado para la materia \x1b[43m**");
printf("\n\t**\x1b[0m Sistemas operativos \x1b[43m**");
printf("\n\t**\x1b[0m Trabajo practico numero 4 \x1b[43m**");
printf("\n\t*******************************************\x1b[0m");
printf("\n\n");
sleep(1);
}