diff options
-rwxr-xr-x | slides/new.sh | 22 |
1 files changed, 22 insertions, 0 deletions
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 |