Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 43 lines (27 sloc) 0.919 kb
#!/usr/bin/env bash
set -e
cd `dirname $0`/..
DATE=`date '+%Y%m%d'`
BASENAME="clojure-tutorial-$DATE"
OUT="out/$BASENAME"
ASSETS="$OUT/slide-assets"
echo "Creating directories under $OUT ..."
rm -rf "$OUT"
mkdir -p "$ASSETS"
echo "Copying slides, images, and JavaScript ..."
cp "lib/org-html-slideshow/production/org-html-slideshow.js" "$ASSETS"
cp -r src/css/* "$ASSETS"
cp src/images/* "$ASSETS"
cp "src/org/index.html" "$OUT/slides.html"
echo "Transforming links in slide HTML ..."
perl -p -i -e 's/\.\.\/css/slide-assets/go; s/\.\.\/images/slide-assets/go; s/\.\.\/\.\.\/lib\/org-html-slideshow\/production\/org-html-slideshow\.js/slide-assets\/org-html-slideshow.js/' "$OUT/slides.html"
for i in $OUT/slide-assets/*.css; do
perl -p -i -e 's/\.\.\/images\///go;' $i
done
echo "Creating $BASENAME.zip ..."
(
cd "out"
rm -f "$BASENAME.zip"
zip -r "$BASENAME" "$BASENAME"
)
echo "Done."
Jump to Line
Something went wrong with that request. Please try again.