-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexport.sh
64 lines (42 loc) · 966 Bytes
/
export.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
53
54
55
56
57
58
59
60
61
62
63
64
# 简单的导出干净博客的工具
# 默认保存在$HOME/new_site目录
echo '************************************************'
echo Blog will save to new_site
echo '************************************************'
echo clean path new_site...
rm -rf new_site
mkdir new_site
echo use git archive to export...
git archive master | tar -x -C new_site
cd new_site
echo remove _posts
rm -rf _posts
mkdir _posts
echo remove about
rm -rf about
echo remove release
rm -rf release
echo remove downloads
rm -rf downloads
echo remove guestbook
rm -rf guestbook
echo remove links
rm -rf links
echo regenerate CNAME
rm -rf CNAME
echo remove images
rm -rf images
echo remove libs
rm -rf libs
touch CNAME
echo remove README
rm -rf README*
touch README.md
echo Auto generate README > README.md
echo Done
echo You still need to do
echo '------------------------'
echo 1. change _config.yml
echo 2. change CNAME
echo 3. push to your branch
echo Thank you!