blob: b3d15dc2a5e3698a4958d1562c6b34714dca5875 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/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
|