From 40ea66381f0d005dadd430a9e4128e561cd1d601 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sun, 8 Jul 2018 17:46:05 -0300 Subject: Add slides/new.sh for bootstrapping new reveal.js presentations --- slides/new.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 slides/new.sh (limited to 'slides') diff --git a/slides/new.sh b/slides/new.sh new file mode 100755 index 0000000..f985ca6 --- /dev/null +++ b/slides/new.sh @@ -0,0 +1,22 @@ +#!/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/ + git pull + git --work-tree="../$1/reveal.js" checkout HEAD -- . + popd +} + +[ -n "$1" ] || { + echo "Missing folder name as argument." + exit 1 +} + +outdir="$1" +mkdir "$outdir" +mkdir "$outdir/reveal.js" +update-reveal-js $outdir -- cgit v1.2.3