diff options
author | EuAndreh <eu@euandre.org> | 2018-07-11 13:50:28 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2018-07-11 13:50:28 -0300 |
commit | 9e56cf08f928a94507d9921dac381d819349ed3d (patch) | |
tree | 3e577b9d5b29895d556e998b7b236fd8037f4fce /slides | |
parent | Create base index.org sample slide (diff) | |
download | euandre.org-9e56cf08f928a94507d9921dac381d819349ed3d.tar.gz euandre.org-9e56cf08f928a94507d9921dac381d819349ed3d.tar.xz |
Register used reveal.js VERSION for each slide
Diffstat (limited to 'slides')
-rwxr-xr-x | slides/new.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/slides/new.sh b/slides/new.sh index 1321eb9..b3d15dc 100755 --- a/slides/new.sh +++ b/slides/new.sh @@ -5,10 +5,11 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" cd $SCRIPT_DIR function update-reveal-js(){ - pushd reveal.js/ - git pull + pushd reveal.js/ > /dev/null git --work-tree="../$1/reveal.js" checkout HEAD -- . - popd + git checkout $(cat "../$1/reveal.js/VERSION" &> /dev/null || printf ".") + git rev-parse HEAD > "../$1/VERSION" + popd > /dev/null } [ -n "$1" ] || { @@ -17,7 +18,6 @@ function update-reveal-js(){ } outdir="$1" -mkdir "$outdir" -mkdir "$outdir/reveal.js" +mkdir -p "$outdir/reveal.js" cp base.org "$outdir/index.org" update-reveal-js $outdir |