-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.sh
executable file
·294 lines (262 loc) · 10.3 KB
/
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
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
if [ "$1" == "" ] ; then
echo "First arg should be 'build' or 'testvale'"
exit 1
fi
MODE="$1"
if [ "$2" == "" ] ; then
echo "Second arg should be 'all' or a page name"
exit 1
fi
TARGET="$2"
if [ "$3" == "" ] ; then
echo "Third arg should be path to Valestrom.jar"
exit 1
fi
VALESTROM="$3"
if [ "$4" == "" ] ; then
echo "Fourth arg should be path to VmdSiteGen"
exit 1
fi
VMD_SITE_GEN="$4"
echo $MODE $TARGET $VALESTROM
if [ $MODE == "build" ] ; then
if [ $TARGET == "clean" ] || [ $TARGET == "all" ] ; then
rm -rf build
mkdir build
mkdir build/components
mkdir build/images
mkdir build/guide
mkdir build/vision
mkdir build/releases
fi
fi
if [ $TARGET == "vision" ] || [ $TARGET == "all" ] ; then
echo "Doing vision"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/vision/vision app/vision/vision.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/vision/vision app/vision/vision.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "vision-safety-generational-references" ] || [ $TARGET == "all" ] ; then
echo "Doing vision-safety-generational-references"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/vision/safety-generational-references app/vision/safety-generational-references.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/vision/safety-generational-references app/vision/safety-generational-references.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "vision-safety-type-stability" ] || [ $TARGET == "all" ] ; then
echo "Doing vision-safety-type-stability"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/vision/safety-type-stability app/vision/safety-type-stability.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/vision/safety-type-stability app/vision/safety-type-stability.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "vision-speed-single-ownership" ] || [ $TARGET == "all" ] ; then
echo "Doing vision-speed-single-ownership"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/vision/speed-single-ownership app/vision/speed-single-ownership.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/vision/speed-single-ownership app/vision/speed-single-ownership.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "comparisons" ] || [ $TARGET == "all" ] ; then
echo "Doing comparisons"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/comparisons app/comparisons.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/comparisons app/comparisons.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "fearless" ] || [ $TARGET == "all" ] ; then
echo "Doing fearless"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/fearless app/fearless.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/fearless app/fearless.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "contributors" ] || [ $TARGET == "all" ] ; then
echo "Doing contributors"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/contributors app/contributors.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/contributors app/contributors.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "download" ] || [ $TARGET == "all" ] ; then
echo "Doing download"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/download app/download.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/download app/download.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "collections" ] || [ $TARGET == "all" ] ; then
echo "Doing collections"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/collections app/guide/collections.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/collections app/guide/collections.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "externs" ] || [ $TARGET == "all" ] ; then
echo "Doing externs"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/externs app/guide/externs.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/externs app/guide/externs.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "functions" ] || [ $TARGET == "all" ] ; then
echo "Doing functions"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/functions app/guide/functions.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/functions app/guide/functions.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "generics" ] || [ $TARGET == "all" ] ; then
echo "Doing generics"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/generics app/guide/generics.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/generics app/guide/generics.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "interfaces" ] || [ $TARGET == "all" ] ; then
echo "Doing interfaces"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/interfaces app/guide/interfaces.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/interfaces app/guide/interfaces.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "introduction" ] || [ $TARGET == "all" ] ; then
echo "Doing introduction"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/introduction app/guide/introduction.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/introduction app/guide/introduction.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "modules" ] || [ $TARGET == "all" ] ; then
echo "Doing modules"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/modules app/guide/modules.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/modules app/guide/modules.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "patterns" ] || [ $TARGET == "all" ] ; then
echo "Doing patterns"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/patterns app/guide/patterns.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/patterns app/guide/patterns.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "references" ] || [ $TARGET == "all" ] ; then
echo "Doing references"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/references app/guide/references.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/references app/guide/references.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "regions" ] || [ $TARGET == "all" ] ; then
echo "Doing regions"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/regions app/guide/regions.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/regions app/guide/regions.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "structs" ] || [ $TARGET == "all" ] ; then
echo "Doing structs"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/structs app/guide/structs.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/structs app/guide/structs.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "unsafe" ] || [ $TARGET == "all" ] ; then
echo "Doing unsafe"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/unsafe app/guide/unsafe.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/guide/unsafe app/guide/unsafe.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "home" ] || [ $TARGET == "all" ] ; then
echo "Doing home"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/home app/home.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/home app/home.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
if [ $MODE == "build" ] ; then
cp build/home build/index.html
fi
fi
if [ $TARGET == "contribute" ] || [ $TARGET == "all" ] ; then
echo "Doing contribute"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/contribute app/contribute.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/contribute app/contribute.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $TARGET == "roadmap" ] || [ $TARGET == "all" ] ; then
echo "Doing roadmap"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/roadmap app/roadmap/roadmap.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/roadmap app/roadmap/roadmap.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
cp app/roadmap/*.css build
fi
if [ $TARGET == "project" ] || [ $TARGET == "all" ] ; then
echo "Doing project"
echo $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/project app/project.vmd
eval $VMD_SITE_GEN/build/vmdsitegen $MODE --compiler_dir $VALESTROM --out build/project app/project.vmd
if [ $? != 0 ]; then
echo "Failed!"
exit 1
fi
fi
if [ $MODE == "build" ] ; then
echo "Copying..."
cp app/*.css build
cp app/rss.xml build
cp app/components/*.css build/components
cp app/components/*.js build/components
cp app/components/*.png build/components
cp app/images/* build/images
fi
echo "Done!"