-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompile.sh
More file actions
executable file
·46 lines (33 loc) · 936 Bytes
/
compile.sh
File metadata and controls
executable file
·46 lines (33 loc) · 936 Bytes
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
#!/bin/bash
# So we can see what we're doing
set -x
# Exit with nonzero exit code if anything fails
set -e
# Remove and create a fresh directory for output distribution
rm -Rf dist
mkdir -p dist
# Iterate through the list of Bikeshed files and create the HTML files
# Execute without installing Bikeshed!!
for i in *.bs; do
echo "----- Compiling $i"
.py/bin/bikeshed --print=console spec -f "$i"
# curl https://api.csswg.org/bikeshed/ -F file=@"$i" -F force=1 > "${i%.*}".html
done
# Move all the generated HTML files to the output directory
if [ -d dist ]; then
mv *.html dist
cp resources/index.html dist
fi
# Copy static resources - images, sequence diarams and resources to dist
if [ -d resources ]; then
cp -R resources dist
fi
if [ -d sequence-diagrams ]; then
cp -R sequence-diagrams dist
fi
if [ -d images ]; then
cp -R images dist
fi
if [ -d references ]; then
cp -R references dist
fi