-
Notifications
You must be signed in to change notification settings - Fork 0
/
akd
executable file
·55 lines (51 loc) · 1.21 KB
/
akd
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
#!/bin/bash
# -e if error happen , exit immediately
# -u if unassigned argu exist , exit immediately
set -eu
path=$PWD # path in the time executing
RED="\033[31m"
BLUE="\033[34m"
GREEN="\033[32m"
AMARANTH='\033[35m'
DFT="\033[0m" # default
ERR="${RED}[!]${DFT}"
NOTE="${BLUE}[*]${DFT}"
INFO="${GREEN}[+]${DFT}"
if [ $# -lt 1 ] || [ $# -gt 2 ]; then
echo -e "${ERR} Usage : ./akd <option> [extra]"
exit 1
fi
export PYTHONPATH=`pwd`
case "$1" in
run)
echo -e "${INFO} run the kernel build procedure"
python3 main.py run
;;
build)
echo -e "${ERR} TODO"
exit 1
# python3 main.py run
;;
menu@todo)
echo "Executing command for 'menu@todo'"
# Run the command for 'menu@todo'
;;
recompile@todo)
echo "Executing command for 'recompile@todo'"
# Run the command for 'recompile@todo'
;;
ctf)
echo -e "${INFO} run the ctf kernel"
python3 main.py $@
;;
clean)
echo "Executing command for 'clean'"
rm -rf fs-root
rm -rf kernel-root
rm -rf download
;;
*)
echo -e "${ERR} argu \`$1\` must in ${valid_list[*]}"
exit 1
;;
esac