diff --git a/build.sh b/build.sh index 2333e3a..7a02b0c 100755 --- a/build.sh +++ b/build.sh @@ -3,14 +3,18 @@ FILE="$(realpath "${BASH_SOURCE[0]}")" ROOT="$(dirname "${FILE}")" INPUT="${ROOT}/in" +INPUTS="${ROOT}/in.txt" OUTPUT="${ROOT}/out" +function main { +local file +local files=() + rm --force --recursive "${OUTPUT}" mkdir --parents "${OUTPUT}" -FILES=() -for f in $(cat "${ROOT}/in.txt") ; do - FILES+=("${INPUT}/${f}.md") +for file in $(cat "${INPUTS}") ; do + files+=("${INPUT}/${f}.md") done pandoc \ @@ -27,4 +31,8 @@ pandoc \ --variable revealjs-url='/sw/revealjs/up' \ --variable slideNumber \ \ -"${FILES[@]}" +"${files[@]}" + +} + +main