diff options
Diffstat (limited to 'markdown2pdf')
-rw-r--r-- | markdown2pdf | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/markdown2pdf b/markdown2pdf index 59c0ba634..80b2723cf 100644 --- a/markdown2pdf +++ b/markdown2pdf @@ -21,6 +21,13 @@ for p in pandoc pdflatex; do } done +ALL="$*" +ARGS=${ALL%% -- *} # only the part before ' -- ' delimiters is relevant +set -- $ARGS + +REST=${ALL#$ARGS}; REST=${REST#--} +PANDOC_OPTS=${REST:-$PANDOC_OPTS} + outfile= for option; do if [ -n "$prev" ]; then @@ -52,6 +59,12 @@ done } infile=$1 +shift + +if [ -n "$@" ]; then + echo >&2 "Warning: extra arguments '$@' will be ignored!" +fi + if [ -z "$outfile" ]; then if [ -n "$infile" ]; then outfile=${infile%.*}.pdf |