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
|
#!/bin/sh -xe
#
# This script builds the tutorial and then creates a tarball that
# is pulled regularly from the server
#
cd $(dirname $0)
# Build the tutorial
(
cd tutorial
./gen.sh
)
# Make a dist directory and copy over files
DISTDIR=$(mktemp -d)
mkdir -p ${DISTDIR}/tutorial
mkdir -p ${DISTDIR}/assets
cp -vp index.html ${DISTDIR}/
cp -vp \
tutorial/0*.html \
tutorial/index.html \
${DISTDIR}/tutorial
cp -vp \
../screenshot.png \
${DISTDIR}/assets/screenshot.png
tar -c -f - -C ${DISTDIR} \. | xz > website_dist.tar.xz
rm -fr ${DISTDIR}
|