-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodocal.sh
executable file
·70 lines (67 loc) · 1.47 KB
/
todocal.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
#!/bin/bash
####################################
# CIS 1910 - Spring 2023
# Final Project: TodoCal
# Jason Hom and Audrey Yang
####################################
function main() {
cd ~/todocal
case $1 in
todo)
case $2 in
add)
./todo_cmd.sh add
;;
show)
./todo_cmd.sh show
;;
edit)
./todo_cmd.sh edit
;;
delete)
./todo_cmd.sh delete
;;
"")
./todo.sh
;;
*)
printf "Error: unrecognized :("
;;
esac
;;
cal)
case $2 in
add)
./appt_cmd.sh add
;;
show)
./appt_cmd.sh show
;;
today)
./appt_cmd.sh today
;;
edit)
./appt_cmd.sh edit
;;
delete)
./appt_cmd.sh delete
;;
"")
./appt.sh
;;
*)
printf "Error: unrecognized :("
;;
esac
;;
help)
printf "\n*** HELP ***\n"
printf "Available commands:\n[todo|cal] [add|show|edit|delete]\n"
;;
*)
printf "Usage:\n./todocal.sh [todo|cal] [add|show|edit|delete]\n"
;;
esac
exit 0
}
main $1 $2