From 4a70b86591c7b0631f7f8642a681576d60026b75 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 29 Feb 2024 16:13:59 +0100 Subject: [PATCH] inputs --- build.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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