/
fixups_sh
342 lines (341 loc) · 5.68 KB
/
fixups_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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
#!/usr/bin/env bash
set -o errexit
set -o pipefail
set -o nounset
# set -o xtrace
# Make the generated .html files have the same time as the source
# for the moment
for THIS_FILE in *.md
do
# Look for a generated file
if [ -f "_site/${THIS_FILE/%.md/.html}" ]
then
touch -r "$THIS_FILE" "_site/${THIS_FILE/%.md/.html}"
fi
done
# Make the Table Talk epubs
EPUB_CACHE_DIR=../cache_epubs
# Create a cache directory if none_exits
if [ ! -d $EPUB_CACHE_DIR ]
then
mkdir -p $EPUB_CACHE_DIR
fi
for TABLE_TALK in ttalk201???.md
do
EPUB_FILE_NAME=$(basename $TABLE_TALK .md).epub
if [ -f _site/$EPUB_FILE_NAME ]
then
echo That\'s funny _site/$EPUB_FILE_NAME already exists!!
continue
fi
# Take from the cache directory if available, if not make a
# new file and put it there
if [ $EPUB_CACHE_DIR/$EPUB_FILE_NAME -nt $TABLE_TALK ]
then
cp -p $EPUB_CACHE_DIR/$EPUB_FILE_NAME _site
else
pandoc --ascii -o _site/$EPUB_FILE_NAME $TABLE_TALK
cp -p _site/$EPUB_FILE_NAME $EPUB_CACHE_DIR
fi
done
# copy in and rename PDFs
# Robots.txt for CDN
cp -p cdnb.robots.txt ../austta/robots.txt
# special case copy and rename old files
NEW_NAME="Timetable History Industrials.pdf"
OLD_NAME="Timetable History In#BAC8C9.pdf"
if [ ! -f _site/"$NEW_NAME" ]
then
cp -ip ../old_site/"$OLD_NAME" _site/"$NEW_NAME"
else
echo New file $NEW_NAME already exists! >&2
fi
NEW_NAME="Timetable History North Western.pdf"
OLD_NAME="Timetable History No#BAC8D4.pdf"
if [ ! -f _site/"$NEW_NAME" ]
then
cp -ip ../old_site/"$OLD_NAME" _site/"$NEW_NAME"
else
echo New file $NEW_NAME already exists! >&2
fi
NEW_NAME="Timetable History Private takenover.pdf"
OLD_NAME="Timetable History Pr#BAC8DE.pdf"
if [ ! -f _site/"$NEW_NAME" ]
then
cp -ip ../old_site/"$OLD_NAME" _site/"$NEW_NAME"
else
echo New file $NEW_NAME already exists! >&2
fi
# bulk load of old PDFs and Gifs etc
while IFS= read -r line; do
if [ ! -f _site/"$line" ]
then
cp -ip ../old_site/"$line" _site
else
echo New file $line already exists! >&2
fi
done <<END_OLD
AATTC Australian Railways TT list.pdf
Modelrules.pdf
Timetable History Eastern.pdf
Timetable History Northern.pdf
Timetable History Warringah.pdf
Timetable History Western.pdf
Coachtrantim.html
Greyhound.html
MVC list.html
NSW.html
Nationaltim.html
Pioneertim.html
SYDNEY.html
Timetable History Index.html
VICTORIA.html
VIP list.html
actiontimes.html
brisbanepriv.html
christmas.html
christmas2004.html
christmas2007.html
dates.html
fireflytim.html
histairlines.html
maychanges.html
melbchanges.html
melbourne.html
melbpocketTTlist.html
otherexpress.html
perthchange.html
perthtims.html
qcountry.html
sacountry.html
tasmantims.html
times097.html
times197.html
times198.html
times199.html
times298.html
times299.html
times397.html
times398.html
times399.html
times496.html
times497.html
times498.html
times499.html
times596.html
times597.html
times598.html
times696.html
times697.html
times698.html
times796.html
times798.html
times897.html
times898.html
times997.html
times998.html
timesd96.html
timesd98.html
timesn98.html
timeso98.html
timeso99.html
wacountry.html
MVC_2.html
2014 AATTC logo- no palaver-small.gif
2014 AATTC logo.gif
2014 ATA logo- no palaver-small.gif
2014 ATA logo.gif
AATTClogo.gif
ATAlogo.gif
Image1.gif
Image22.gif
Image23.gif
Image28.gif
Image29.gif
Image30.gif
Image31.gif
Image32.gif
Image33.gif
Image34.gif
Image36.gif
Image37.gif
Image39.gif
Insig43a.gif
Insig43b.gif
Insig43c.gif
Insig43d.gif
anjet.gif
banner.gif
banner1.gif
bullback.gif
gardiner.gif
gl1.gif
gl2.gif
gl3.gif
gl4.gif
gl5.gif
insigh16.gif
insigh17.gif
insigh20.gif
insigh21.gif
insigh23.gif
insigh24.gif
insigh31.gif
insigh32.gif
insigh33.gif
insigh34.gif
insigh35.gif
insigh36.gif
insigh37.gif
insigh40.gif
insigh41.gif
insigh44.gif
insigh45.gif
insigh53.gif
insight8.gif
insight9.gif
lilydale.gif
logo.gif
logosmll.gif
new.gif
thetimes.gif
tim19901.GIF
tim19902.GIF
tim19903.GIF
tim19904.GIF
tim19905.GIF
tim19906.GIF
tim19907.GIF
tim19908.GIF
tim19909.GIF
tim19910.GIF
tim19911.GIF
tim19912.GIF
tim19913.GIF
tim19914.GIF
tim29901.GIF
tim29902.GIF
tim29903.GIF
tim29904.GIF
tim29905.GIF
tim29906.GIF
tim39901.gif
tim39902.gif
tim39903.gif
tim39904.gif
tim39905.gif
tim39906.gif
tim39907.gif
tim39908.gif
tim39909.gif
tim79801.gif
tim79802.gif
tim79803.gif
tim79804.gif
tim79805.gif
tim79806.gif
tim79807.gif
tim79808.gif
tim79809.gif
tim79810.gif
tim79811.gif
tim79812.gif
tim89801.gif
tim89802.gif
tim89803.gif
tim89804.gif
tim89805.gif
tim99801.gif
tim99802.gif
tim99803.gif
tim99804.gif
timd9801.gif
timd9802.gif
timd9803.gif
timd9804.gif
timd9805.gif
timd9806.gif
timd9807.gif
timd9808.gif
timd9809.gif
timd9810.gif
timd9811.gif
timeicon.gif
times698.gif
times897.gif
timex698.gif
timn9801.gif
timn9803.gif
timn9804.gif
timo9801.gif
timo9802.gif
timo9803.gif
timo9804.gif
timo9805.gif
timo9806.gif
timo9807.gif
timo9902.gif
timo9915.gif
timo9917.gif
timo9918.gif
timo9924.gif
timo9926.gif
tk980801.GIF
tk980802.GIF
tk980803.GIF
tk980804.GIF
tk980805.GIF
tk980806.GIF
tk980807.GIF
tk980808.GIF
tk980809.GIF
tk980810.GIF
tk980811.GIF
tk980812.GIF
tk980813.GIF
tk980814.GIF
tk980901.GIF
tk980902.GIF
tk980903.GIF
tk980904.GIF
tk980905.GIF
tk980906.GIF
tk980907.GIF
tk981001.gif
tk981002.gif
tk981003.gif
tk981004.gif
tk981005.gif
tk981006.gif
tk981007.gif
tk981101.gif
tk981102.gif
tk981103.gif
tk981104.gif
tk981105.gif
tk981106.gif
tk981201.gif
tk981202.gif
tk981203.gif
tk981204.gif
tk981209.gif
tk990201.gif
tk990202.gif
tk990203.gif
tk990204.gif
tk990205.gif
tk990206.gif
tk990207.gif
tk990208.gif
tk990209.gif
tk990301.gif
tk990401.gif
ttalk.gif
Image38.jpg
Image4.jpg
back.jpg
io_logo.jpg
rp_logo.jpg
austrail.mht
insigh35.doc
END_OLD