forked from gotgit/gotgit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
87 lines (70 loc) · 1.71 KB
/
Rakefile
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
## Set change log file for your documents
#CHANGELOG="../debian/changelog"
#
#doc_rev=`head -1 #{CHANGELOG} | sed -e "s/^\\S*\\s\\+(\\([0-9]*:\\)\\?\\(\\S\\+\\)).*/\\2/"`
#doc_datestring=`grep "^ -- .* <.*> .\\+$" #{CHANGELOG} | head -1 | sed -e "s/^.\\+> \\(.\\+\\)$/\\1/g"`
#doc_date=`date -d "#{doc_datestring}" +"%Y-%m-%d %H:%M:%S"`
#ENV["DOC_REV"]=ENV["DOC_REV"]? ENV["DOC_REV"] : doc_rev.strip
#ENV["DOC_DATE"]=ENV["DOC_DATE"]? ENV["DOC_DATE"] : doc_date.strip
ENV["DOC_REV"]= "0.1"
require 'docbones'
source_suffix = '.rst'
::Docbones.setup source_suffix
ENV["DOC_INDEX"]=ENV["DOC_INDEX"]? ENV["DOC_INDEX"] : "index"
PROJ.root= "."
PROJ.name = "gitbook"
PROJ.index = ENV["DOC_INDEX"]
PROJ.output = "../../output"
PROJ.images = "images"
PROJ.css_path = "common/nf.lightbox.css,common/doc.css"
PROJ.js_path = "common/jquery.js,common/nf.lightbox.js,common/load-nf.lightbox.js"
# PROJ.pdf_style = "/opt/ossxp/conf/pdf/ossxp.style"
PROJ.pdf_style = "common/pdf.style"
PROJ.default_dpi = 120
task:default do
sh 'rake -T'
end
task:preface do
ENV["DOC_INDEX"] = "preface"
sh 'rake html'
end
task:part1 do
ENV["DOC_INDEX"] = "part1"
sh 'rake html'
end
task:part2 do
ENV["DOC_INDEX"] = "part2"
sh 'rake html'
end
task:part3 do
ENV["DOC_INDEX"] = "part3"
sh 'rake html'
end
task:part4 do
ENV["DOC_INDEX"] = "part4"
sh 'rake html'
end
task:part5 do
ENV["DOC_INDEX"] = "part5"
sh 'rake html'
end
task:part6 do
ENV["DOC_INDEX"] = "part6"
sh 'rake html'
end
task:part7 do
ENV["DOC_INDEX"] = "part7"
sh 'rake html'
end
task:part8 do
ENV["DOC_INDEX"] = "part8"
sh 'rake html'
end
task:part9 do
ENV["DOC_INDEX"] = "part9"
sh 'rake html'
end
task:en do
ENV["DOC_INDEX"] = "en"
sh 'rake html'
end