-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhugo_main.sh
43 lines (41 loc) · 880 Bytes
/
hugo_main.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
#!/bin/bash
#author: Lruihao
echo "--------------Hugo Admin--------------"
echo "Please enter the serial number to work"
echo "--------------------------------------"
echo "1. post"
echo "2. server"
echo "3. server:production"
echo "4. build"
echo "5. submodule-sync"
echo "6. push"
echo "--------------------------------------"
echo "Press Ctrl+C to stop"
read num
case $num in
1)
sh post_generator.sh
;;
2)
hugo server --disableFastRender --navigateToChanged --source=../ --bind 0.0.0.0
;;
3)
hugo server --disableFastRender --navigateToChanged --environment production --source=../ --bind 0.0.0.0
;;
4)
hugo -v --gc --minify --source=../
;;
5)
sh submodule_sync.sh
;;
6)
sh auto_push.sh
;;
*)
echo "There is no such serial number"
;;
esac
echo "Press any key to continue..."
read x
clear
sh hugo_main.sh