aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xslides/new.sh10
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