From 407ec5913d24439484b366b725157b1d175f07c3 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Fri, 4 Nov 2016 22:41:57 +0000 Subject: [PATCH] Rework makeAll.sh to make multiple Bookes and a Bumper Booke too. The Bumper is made if more than 1 Booke is specified. --- makeAll.sh | 33 ++++++++++++++++++++++++++------- makeBooke.sh | 4 ++-- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/makeAll.sh b/makeAll.sh index 94795b5..8eb329f 100755 --- a/makeAll.sh +++ b/makeAll.sh @@ -2,8 +2,8 @@ # # Build all forms of the Booke. -if [ $# != 1 ]; then - echo "Usage: makeAll.sh " +if [ $# -lt 1 ]; then + echo "Usage: makeAll.sh [ ...]" exit 1 fi @@ -32,10 +32,29 @@ makeATransposedBooke() ./makeWeb.sh "$1" "$2" "$3" } -makeABooke $1 +makeASingleBooke() +{ + makeABooke $1 -./makeCello.sh $1 -makeATransposedBooke $1-Cello $1 cello + ./makeCello.sh $1 + makeATransposedBooke $1-Cello $1 cello -./makeHornInF.sh $1 -makeATransposedBooke $1-HornInF $1 "horn in F" + ./makeHornInF.sh $1 + makeATransposedBooke $1-HornInF $1 "horn in F" +} + +makeBumperBooke() +{ + # This can only be used once all the other Bookes have been built. + ./makeBooke.sh A4 "$@" + ./makeBooke.sh A5 "$@" + ./makeBooklet.sh "Bumper" +} + +for booke in "$@" +do + makeASingleBooke $booke +done +if [ $# -gt 1 ]; then + makeBumperBooke "$@" +fi diff --git a/makeBooke.sh b/makeBooke.sh index 4d012b6..f7f19c2 100755 --- a/makeBooke.sh +++ b/makeBooke.sh @@ -35,9 +35,9 @@ if [ $# -eq 1 ]; then 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