Merge pull request #34 from thecb1/patch-1

Fix chaptercount for 0-padding
This commit is contained in:
KrumpetPirate 2017-10-21 18:48:55 -05:00 committed by GitHub
commit f06b768c55

View File

@ -68,7 +68,7 @@ normalize_whitespace() {
} }
chapter_padding() { chapter_padding() {
chaptercount=$($GREP -Pc "title\s+:\sChapter\s\d+" $metadata_file) chaptercount=$($GREP -Pc "Chapter.*start.*end" $metadata_file)
if [[ $chaptercount -gt 9 && $chaptercount -lt 100 ]] if [[ $chaptercount -gt 9 && $chaptercount -lt 100 ]]
then then
chapter=$(sed -e 's/Chapter \([[:digit:]]\)$/Chapter 0\1/' <<<$chapter) chapter=$(sed -e 's/Chapter \([[:digit:]]\)$/Chapter 0\1/' <<<$chapter)