-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
43 lines (38 loc) · 750 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
33
34
35
36
37
38
39
40
41
42
43
#include <stdio.h>
#include <string.h>
#include "helpers/useges/printUsage.c"
#include "helpers/getCwd.c"
#include "commads/init.c"
#include "commads/task.c"
int main(int argc, char *argv[])
{
char *cwd = getCwd();
char *command = argv[1];
switch (command[0])
{
case 'i':
if (strcmp(command, "init") == 0)
{
init(cwd);
}
else
{
printf("Command: %s\n", command);
}
break;
case 't':
if (strcmp(command, "task") == 0)
{
task(cwd,argv,0,0);
}
else
{
printf("Command: %s\n", command);
}
break;
default:
printUsage();
break;
}
return 0;
}