-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
55 lines (40 loc) · 895 Bytes
/
build.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
#!/bin/sh
colorEcho(){
if [ ! -n "$1" ];then
echo "string is required"
exit
fi
if [ ! -n "$2" ];then
color=1
else
color=$2
fi
case $color in
1) echo "\033[32;1m $1 \033[0m" #green
;;
2) echo "\033[30;1m $1 \033[0m" #black
;;
3) echo "\033[31;5;1m $1 \033[0m" #red
;;
4) echo "\033[33;1m $1 \033[0m" #yellow
;;
5) echo "\033[34;1m $1 \033[0m" #blue
;;
6) echo "\033[35;1m $1 \033[0m" #purpule
;;
7) echo "\033[37;1m $1 \033[0m" #white
;;
8) echo "\033[36;1m $1 \033[0m" #sky blue
;;
esac
}
colorEcho "............ start ............\n"
rm -f db.json
colorEcho "............ rm -f db.json ............\n"
hexo clean
colorEcho "............ hexo clean ............\n"
hexo g
colorEcho "............ hexo g ............\n"
hexo d
colorEcho "............ hexo d ............\n"
colorEcho "............ end ............"