37 lines
600 B
Bash
37 lines
600 B
Bash
#!/bin/bash
|
|
|
|
declare -A CHAPTERS=(
|
|
[Matt]=28
|
|
[Mark]=16
|
|
[Luke]=24
|
|
[John]=21
|
|
)
|
|
|
|
for book in Matt Mark Luke John; do
|
|
count=${CHAPTERS[$book]}
|
|
for i in $(seq 1 $count); do
|
|
outfile="${book}${i}-w.tex"
|
|
cat > "$outfile" << EOF
|
|
% !TEX root = ${book}${i}-w.tex
|
|
% ${book}${i}-w.tex
|
|
|
|
\input {_header}
|
|
|
|
\definingfootnotestrue
|
|
\excludecomment{glossarytext}
|
|
\input {_glossary}
|
|
|
|
\begin{document}
|
|
\input{_BiblioRef}
|
|
\input{${book}${i}}
|
|
|
|
\definingfootnotesfalse
|
|
\includecomment{glossarytext}
|
|
\input {_glossary}
|
|
|
|
\end{document}
|
|
EOF
|
|
echo "Created $outfile"
|
|
done
|
|
done
|