changeset 762:d6f1f2b3bd01 build-default-292

Allow bookes to be build individually but omitted from Bumper Booke.
author Jim Hague <jim.hague@acm.org>
date Wed, 06 Dec 2017 22:51:46 +0000
parents 50dbb0d652ee
children e541bd511187 8007eccb93ae
files makeAll.sh
diffstat 1 files changed, 19 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/makeAll.sh	Sat Oct 14 22:01:53 2017 +0100
+++ b/makeAll.sh	Wed Dec 06 22:51:46 2017 +0000
@@ -1,8 +1,11 @@
 #!/bin/bash
 #
 # Build all forms of the Booke.
+#
+# Arguments are the names of the bookes to build. If a name is
+# prefixed '-', then do not include that section  in the Bumper Booke.
 
-if [ $# -lt 1 ]; then
+if [[ $# -lt 1 ]]; then
     echo "Usage: makeAll.sh <booke dir name> [<booke dir name> ...]"
     exit 1
 fi
@@ -70,11 +73,24 @@
     ./makeBooklet.sh "Bumper"
 }
 
+declare buildBookes
+declare bumperBookes
+
 for booke in "$@"
 do
+    if [[ ${booke:0:1} = "-" ]]; then
+        booke=${booke/#-/}
+    else
+        bumperBookes+=("$booke")
+    fi
+    buildBookes+=("$booke")
+done
+
+for booke in "${buildBookes[@]}"
+do
     makeASingleBooke $booke
 done
-if [ $# -gt 1 ]; then
-    makeBumperBooke "$@"
+if [[ ${#bumperBookes[@]} -gt 1 ]]; then
+    makeBumperBooke "${bumperBookes[@]}"
     cp Bumper*.pdf ./web
 fi