From 16d466739f0ae705c202dbc597bd55319066705d Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 2 Apr 2018 22:46:21 +0100 Subject: [PATCH] Add support for additional args too pandoc --- build.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index f79e05e..9e9a8c7 100755 --- a/build.sh +++ b/build.sh @@ -3,6 +3,8 @@ SCRIPT=`realpath $0` SCRIPTPATH=`dirname $SCRIPT` +ADDITIONAL_ARGS=${@:2} + INPUT_FILE=`realpath $1` INPUT_DIR=`dirname $INPUT_FILE` METADATA_FILE="$INPUT_DIR/metadata.yaml" @@ -15,10 +17,10 @@ then INPUT_FILES="$INPUT_FILES $METADATA_FILE" fi -PANDOC_ARGS="$INPUT_FILES --template $SCRIPTPATH/main.tex -o $OUTPUT_FILE" +PANDOC_ARGS="$INPUT_FILES --template $SCRIPTPATH/main.tex -o $OUTPUT_FILE $ADDITIONAL_ARGS" -echo "Building document..." +echo "> Building document..." pandoc $PANDOC_ARGS -echo "Running second pass..." -pandoc $PANDOC_ARGS --lua-filter=second-pass.lua +echo "> Running second pass..." +pandoc --lua-filter=second-pass.lua $PANDOC_ARGS