-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall.sh
executable file
·47 lines (40 loc) · 884 Bytes
/
install.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
#!/bin/sh
install(){
sudo mkdir -p /usr/share/skr
sudo cp -r src/parser /usr/share/skr
sudo cp skrkid /usr/share/skr
sudo cp skrcore /usr/share/skr
sudo cp skr /usr/bin/
}
build(){
gcc src/core/main.c -o skrcore
gcc src/kid/skrkid.c -o skrkid
}
uninstall(){
sudo rm -rf /usr/share/skr
sudo rm /usr/bin/skr
}
usage(){
echo usage:
echo " "
echo " ./install.sh builds and installs skr"
echo " ./install.sh -b builds skr"
echo " ./install.sh -i installs skr"
echo " ./install.sh -u uninstalls skr"
}
if [ "$#" = "0" ];then
echo building and installing skr
build
install
elif [ "$1" = "-b" ];then
echo building skr
build
elif [ "$1" = "-i" ];then
echo installing skr
install
elif [ "$1" = "-u" ];then
echo uninstalling skr
uninstall
else
usage
fi