comparison makeAll.sh @ 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 ce5c7214f9aa
children 1a838d8dca2a
comparison
equal deleted inserted replaced
761:50dbb0d652ee 762:d6f1f2b3bd01
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # Build all forms of the Booke. 3 # Build all forms of the Booke.
4 #
5 # Arguments are the names of the bookes to build. If a name is
6 # prefixed '-', then do not include that section in the Bumper Booke.
4 7
5 if [ $# -lt 1 ]; then 8 if [[ $# -lt 1 ]]; then
6 echo "Usage: makeAll.sh <booke dir name> [<booke dir name> ...]" 9 echo "Usage: makeAll.sh <booke dir name> [<booke dir name> ...]"
7 exit 1 10 exit 1
8 fi 11 fi
9 12
10 makeABooke() 13 makeABooke()
68 ./makeBooke.sh A4 "$@" 71 ./makeBooke.sh A4 "$@"
69 ./makeBooke.sh A5 "$@" 72 ./makeBooke.sh A5 "$@"
70 ./makeBooklet.sh "Bumper" 73 ./makeBooklet.sh "Bumper"
71 } 74 }
72 75
76 declare buildBookes
77 declare bumperBookes
78
73 for booke in "$@" 79 for booke in "$@"
80 do
81 if [[ ${booke:0:1} = "-" ]]; then
82 booke=${booke/#-/}
83 else
84 bumperBookes+=("$booke")
85 fi
86 buildBookes+=("$booke")
87 done
88
89 for booke in "${buildBookes[@]}"
74 do 90 do
75 makeASingleBooke $booke 91 makeASingleBooke $booke
76 done 92 done
77 if [ $# -gt 1 ]; then 93 if [[ ${#bumperBookes[@]} -gt 1 ]]; then
78 makeBumperBooke "$@" 94 makeBumperBooke "${bumperBookes[@]}"
79 cp Bumper*.pdf ./web 95 cp Bumper*.pdf ./web
80 fi 96 fi