changeset 606:d5357ee6b4b2 build-default-244

Rework makeAll.sh to make multiple Bookes and a Bumper Booke too. The Bumper is made if more than 1 Booke is specified.
author Jim Hague <jim.hague@acm.org>
date Fri, 04 Nov 2016 22:41:57 +0000
parents 3f8a76acf7ad
children 22f3e6a6e7f6 b4eb1753c80f
files makeAll.sh makeBooke.sh
diffstat 2 files changed, 28 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/makeAll.sh	Fri Nov 04 18:52:47 2016 +0000
+++ b/makeAll.sh	Fri Nov 04 22:41:57 2016 +0000
@@ -2,8 +2,8 @@
 #
 # Build all forms of the Booke.
 
-if [ $# != 1 ]; then
-    echo "Usage: makeAll.sh <book dir name>"
+if [ $# -lt 1 ]; then
+    echo "Usage: makeAll.sh <booke dir name> [<booke dir name> ...]"
     exit 1
 fi
 
@@ -32,10 +32,29 @@
     ./makeWeb.sh "$1" "$2" "$3"
 }
 
-makeABooke $1
+makeASingleBooke()
+{
+    makeABooke $1
+
+    ./makeCello.sh $1
+    makeATransposedBooke $1-Cello $1 cello
+
+    ./makeHornInF.sh $1
+    makeATransposedBooke $1-HornInF $1 "horn in F"
+}
 
-./makeCello.sh $1
-makeATransposedBooke $1-Cello $1 cello
+makeBumperBooke()
+{
+    # This can only be used once all the other Bookes have been built.
+    ./makeBooke.sh A4 "$@"
+    ./makeBooke.sh A5 "$@"
+    ./makeBooklet.sh "Bumper"
+}
 
-./makeHornInF.sh $1
-makeATransposedBooke $1-HornInF $1 "horn in F"
+for booke in "$@"
+do
+    makeASingleBooke $booke
+done
+if [ $# -gt 1 ]; then
+    makeBumperBooke "$@"
+fi
--- a/makeBooke.sh	Fri Nov 04 18:52:47 2016 +0000
+++ b/makeBooke.sh	Fri Nov 04 22:41:57 2016 +0000
@@ -35,9 +35,9 @@
         fi
     done
 else
-    bookename="BumperBooke"
+    bookename="Bumper"
     echo "The Bumper Booke" > $builddir/title.txt
-    echo "The collected Bookes of Bottes" > $builddir/subtitle.txt
+    echo "The collected Bookes of Dottes" > $builddir/subtitle.txt
     rm -f $builddir/instrument.txt
     if [ -r $1/instrument.txt ]; then
         cp $1/instrument.txt $builddir/instrument.txt