blob: 21468f0de9cd5f53e9bd3b24645513114cf82973 (
plain)
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
|
#!/bin/bash -e
#
# S2I assemble script for the 'kraxel/s2i-jekyll' image.
# The 'assemble' script builds your application source so that it is ready to run.
#
# For more information refer to the documentation:
# https://github.com/openshift/source-to-image/blob/master/docs/builder_image.md
#
if [[ "$1" == "-h" ]]; then
exec /usr/libexec/s2i/usage
fi
echo "--- debug ---"
id -a
echo "---"
export HOME=/opt/app-root/src
cd $HOME
echo "---> Installing application source ..."
rm -rf /tmp/src/.git
mv /tmp/src ./virtio-spec
echo "---> Building virtio spec ..."
(cd virtio-spec; sh makeall.sh)
echo "---> Move docs output ..."
mkdir output
cp -av virtio-spec/*.{html,css,pdf} virtio-spec/images output
echo "---> CSS fixup ..."
cat <<EOF >> output/*.css
body {
/* no extra long lines please */
max-width: 100ch;
/* center text */
margin: 0px auto;
/* beautify a bit */
padding: 2ex 2em;
border: 2pt #ccc solid;
}
EOF
echo "---> add README ..."
cat <<EOF >> output/README.html
<h1>virtio specification</h1>
<p>
Built from <a href="$OPENSHIFT_BUILD_SOURCE">$OPENSHIFT_BUILD_SOURCE</a>
</p>
EOF
echo "---> Fix permissions ..."
chmod +x . output
chmod -R +r .
find . | xargs ls -ld
|