2013-01-26 13:47:01 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Build all forms of the Booke.
|
2017-12-06 22:51:46 +00:00
|
|
|
#
|
|
|
|
# Arguments are the names of the bookes to build. If a name is
|
2019-07-08 09:46:52 +01:00
|
|
|
# prefixed '-', then do not include that section in the Bumper Booke.
|
2013-01-26 13:47:01 +00:00
|
|
|
|
2017-12-06 22:51:46 +00:00
|
|
|
if [[ $# -lt 1 ]]; then
|
2016-11-04 22:41:57 +00:00
|
|
|
echo "Usage: makeAll.sh <booke dir name> [<booke dir name> ...]"
|
2013-01-26 13:47:01 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2019-03-26 17:54:07 +00:00
|
|
|
# Make the print version of a booke.
|
|
|
|
# Params: <booke dir>
|
|
|
|
makeBookePrint()
|
2013-01-26 13:47:01 +00:00
|
|
|
{
|
2017-10-13 15:44:15 +01:00
|
|
|
# Print graphics.
|
2013-02-20 13:45:58 +00:00
|
|
|
./makeGraphics.sh "$1"
|
2017-10-13 15:44:15 +01:00
|
|
|
|
|
|
|
# Normal graphics printed output.
|
2013-06-26 23:37:45 +01:00
|
|
|
./makeBookeTunePages.sh "$1"
|
2016-11-04 17:59:10 +00:00
|
|
|
./makeBooke.sh A4 "$1"
|
2017-10-13 15:44:15 +01:00
|
|
|
./makeBooke.sh Nook "$1"
|
|
|
|
|
|
|
|
# Compact graphics printed output.
|
|
|
|
./makeBookeTunePages.sh --use-compact "$1"
|
2016-11-04 23:34:41 +00:00
|
|
|
./makeBooke.sh A5 "$1"
|
2013-06-26 23:37:45 +01:00
|
|
|
./makeBooklet.sh "$1"
|
2019-03-26 17:54:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Make a single booke.
|
|
|
|
# Params: <booke dir> [<instrument name>]
|
|
|
|
makeABooke()
|
|
|
|
{
|
|
|
|
makeBookePrint "$1"
|
2017-10-13 15:44:15 +01:00
|
|
|
|
|
|
|
# Web output.
|
2013-02-22 01:09:37 +00:00
|
|
|
./makeWebGraphics.sh "$1"
|
|
|
|
./makeWebAudio.sh "$1"
|
|
|
|
./makeWeb.sh "$1" "$1" "$2"
|
|
|
|
}
|
|
|
|
|
2019-03-26 17:54:07 +00:00
|
|
|
# Make a single transposed booke. We use web audio from the
|
|
|
|
# master booke.
|
|
|
|
# Params: <booke dir> <master booke dir> [<instrument name>]
|
2013-02-22 01:09:37 +00:00
|
|
|
makeATransposedBooke()
|
|
|
|
{
|
2019-03-26 17:54:07 +00:00
|
|
|
makeBookePrint "$1"
|
2017-10-13 15:44:15 +01:00
|
|
|
|
|
|
|
# Web output. Uses audio from main booke.
|
2019-08-06 11:05:12 +01:00
|
|
|
./makeWebGraphics.sh "$1"
|
2013-02-22 01:09:37 +00:00
|
|
|
./makeWeb.sh "$1" "$2" "$3"
|
2013-01-26 13:47:01 +00:00
|
|
|
}
|
|
|
|
|
2016-11-04 22:41:57 +00:00
|
|
|
makeASingleBooke()
|
|
|
|
{
|
|
|
|
makeABooke $1
|
|
|
|
|
|
|
|
./makeCello.sh $1
|
|
|
|
makeATransposedBooke $1-Cello $1 cello
|
2013-02-17 00:27:07 +00:00
|
|
|
|
2016-11-04 22:41:57 +00:00
|
|
|
./makeHornInF.sh $1
|
|
|
|
makeATransposedBooke $1-HornInF $1 "horn in F"
|
2017-09-14 10:41:46 +01:00
|
|
|
|
|
|
|
./makeAltoRecorderCFingering.sh $1
|
|
|
|
makeATransposedBooke $1-AltoRecorderCFingering $1 "alto recorder, C fingering"
|
2016-11-04 22:41:57 +00:00
|
|
|
}
|
2013-02-20 13:03:40 +00:00
|
|
|
|
2019-03-26 17:54:07 +00:00
|
|
|
makeABumperBooke()
|
2016-11-04 22:41:57 +00:00
|
|
|
{
|
|
|
|
# This can only be used once all the other Bookes have been built.
|
2019-03-27 10:48:17 +00:00
|
|
|
for booke in "$@"
|
|
|
|
do
|
|
|
|
./makeBookeTunePages.sh "${booke}"
|
|
|
|
done
|
2016-11-04 22:41:57 +00:00
|
|
|
./makeBooke.sh A4 "$@"
|
2019-03-27 10:48:17 +00:00
|
|
|
for booke in "$@"
|
|
|
|
do
|
|
|
|
./makeBookeTunePages.sh --use-compact "${booke}"
|
|
|
|
done
|
2016-11-04 22:41:57 +00:00
|
|
|
./makeBooke.sh A5 "$@"
|
|
|
|
./makeBooklet.sh "Bumper"
|
|
|
|
}
|
|
|
|
|
2019-03-26 17:54:07 +00:00
|
|
|
makeBumperBookes()
|
|
|
|
{
|
2019-03-27 10:48:17 +00:00
|
|
|
makeABumperBooke "$@"
|
|
|
|
for f in Bumper*.pdf
|
|
|
|
do
|
|
|
|
mv $f ./web
|
|
|
|
done
|
|
|
|
|
|
|
|
local cellobumper
|
|
|
|
local hornbumber
|
|
|
|
local recorderbumper
|
|
|
|
|
|
|
|
for booke in "$@"
|
|
|
|
do
|
|
|
|
cellobumper+=("${booke}-Cello")
|
|
|
|
hornbumper+=("${booke}-HornInF")
|
|
|
|
recorderbumper+=("${booke}-AltoRecorderCFingering")
|
|
|
|
done
|
|
|
|
makeABumperBooke "${cellobumper[@]}"
|
|
|
|
for f in Bumper*.pdf
|
|
|
|
do
|
|
|
|
t=$(echo $f | sed -e "s/.pdf/-Cello.pdf/")
|
|
|
|
mv $f ./web/$t
|
|
|
|
done
|
|
|
|
makeABumperBooke "${hornbumper[@]}"
|
|
|
|
for f in Bumper*.pdf
|
|
|
|
do
|
|
|
|
t=$(echo $f | sed -e "s/.pdf/-HornInF.pdf/")
|
|
|
|
mv $f ./web/$t
|
|
|
|
done
|
|
|
|
makeABumperBooke "${recorderbumper[@]}"
|
|
|
|
for f in Bumper*.pdf
|
|
|
|
do
|
|
|
|
t=$(echo $f | sed -e "s/.pdf/-AltoRecorderCFingering.pdf/")
|
|
|
|
mv $f ./web/$t
|
|
|
|
done
|
2019-03-26 17:54:07 +00:00
|
|
|
}
|
|
|
|
|
2017-12-06 22:51:46 +00:00
|
|
|
declare buildBookes
|
|
|
|
declare bumperBookes
|
|
|
|
|
2016-11-04 22:41:57 +00:00
|
|
|
for booke in "$@"
|
2017-12-06 22:51:46 +00:00
|
|
|
do
|
|
|
|
if [[ ${booke:0:1} = "-" ]]; then
|
|
|
|
booke=${booke/#-/}
|
|
|
|
else
|
|
|
|
bumperBookes+=("$booke")
|
|
|
|
fi
|
|
|
|
buildBookes+=("$booke")
|
|
|
|
done
|
|
|
|
|
|
|
|
for booke in "${buildBookes[@]}"
|
2016-11-04 22:41:57 +00:00
|
|
|
do
|
|
|
|
makeASingleBooke $booke
|
|
|
|
done
|
2017-12-06 22:51:46 +00:00
|
|
|
if [[ ${#bumperBookes[@]} -gt 1 ]]; then
|
2019-03-26 17:54:07 +00:00
|
|
|
makeBumperBookes "${bumperBookes[@]}"
|
2016-11-04 22:41:57 +00:00
|
|
|
fi
|