-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-code-checker.command
More file actions
executable file
·46 lines (35 loc) · 980 Bytes
/
setup-code-checker.command
File metadata and controls
executable file
·46 lines (35 loc) · 980 Bytes
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
cd `dirname $0`
echo -e "\033[32m>> iOS code checker <<\033[0m\n"
while :; do echo
echo -e "Would you like to use the code checker ? [ yes / no ]\n"
echo -n "> "
read flag_read
flag=$(echo $flag_read | tr "[:upper:]" "[:lower:]" )
if [[ "$flag" == "yes" ]]; then
if [ ! -d "spacecommander" ]; then
$(git clone 'https://github.com/whihail/spacecommander.git')
fi
if [ -f "spacecommander/setup-repo.sh" ]; then
$(spacecommander/setup-repo.sh)
fi
break
elif [[ "$flag" == "no" ]]; then
if [ -d "spacecommander" ]; then
$(rm -rf "spacecommander")
fi
if [ -f ".git/hooks/pre-commit" ]; then
$(rm -rf ".git/hooks/pre-commit")
fi
sed -i.bak '/codelog=/d' ~/.bash_profile
sed -i.bak '/codereset=/d' ~/.bash_profile
if [[ -L ".clang-format" ]]; then
$(rm -rf ".clang-format")
fi
cd ~/Documents && $(rm -rf "codeCheckerCache")
echo -e "\033[32m>> remove the code checker success \033[0m\n"
break
else
continue
fi
break
done