blob: b3d15dc2a5e3698a4958d1562c6b34714dca5875 (
plain) (
tree)
|
|
#!/usr/bin/env bash
set -eo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd $SCRIPT_DIR
function update-reveal-js(){
pushd reveal.js/ > /dev/null
git --work-tree="../$1/reveal.js" checkout HEAD -- .
git checkout $(cat "../$1/reveal.js/VERSION" &> /dev/null || printf ".")
git rev-parse HEAD > "../$1/VERSION"
popd > /dev/null
}
[ -n "$1" ] || {
echo "Missing folder name as argument."
exit 1
}
outdir="$1"
mkdir -p "$outdir/reveal.js"
cp base.org "$outdir/index.org"
update-reveal-js $outdir
|