From 4da93e4c960f8a17ebd65a70b912cf8b8b3be893 Mon Sep 17 00:00:00 2001 From: Tim Freund Date: Fri, 17 Oct 2014 00:49:36 -0400 Subject: [PATCH] Add landslide.sh to upstream-training The landslide.sh script (re)builds all presentations in the upstream-training directory. Change-Id: I26487da60d486e4c5346c72673fbf24e796d1c17 --- doc/upstream-training/README | 9 +++++++-- doc/upstream-training/landslide.sh | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100755 doc/upstream-training/landslide.sh diff --git a/doc/upstream-training/README b/doc/upstream-training/README index 26f7daf0..3e052b0d 100644 --- a/doc/upstream-training/README +++ b/doc/upstream-training/README @@ -12,7 +12,12 @@ Install the latest stable version of Landslide with a python package manager lik $ pip install landslide -To build the presentations +To build a presentation +----------------------- + + $ landslide -r -d + +To build all presentations -------------------------- - $ landslide + $ ./landslide.sh diff --git a/doc/upstream-training/landslide.sh b/doc/upstream-training/landslide.sh new file mode 100755 index 00000000..4c440855 --- /dev/null +++ b/doc/upstream-training/landslide.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +which landslide +LANDSLIDE_MISSING=$? + +if [[ ${LANDSLIDE_MISSING} -ne 0 ]]; then + echo "landslide isn't on your path. Do you need to activate a virtual environment?" + exit 1 +fi + +for presentation in *.rst; do + presentation_name=$(basename "${presentation}" .rst) + landslide -r -d "${presentation_name}.html" "${presentation}" +done