From 469a36d8453d49a8d339f1b8d6865e3a4860bdf2 Mon Sep 17 00:00:00 2001 From: roktas Date: Fri, 27 Oct 2006 12:25:11 +0000 Subject: [PATCH] Minor corrections. git-svn-id: https://pandoc.googlecode.com/svn/trunk@19 788f1e2b-df1e-0410-8736-df70ead52e1b --- markdown2pdf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/markdown2pdf b/markdown2pdf index bea336a07..6ca931fdd 100644 --- a/markdown2pdf +++ b/markdown2pdf @@ -21,7 +21,7 @@ for option; do optarg=$(expr "x$option" : 'x[^=]*=\(.*\)') case $option in -h | --h | --help ) - help=yes + help=1 shift ;; -o | --o | --output ) prev=outfile @@ -35,10 +35,10 @@ for option; do esac done -if [ "$help" = "yes" ]; then - echo "Usage: $0 [-o|--output output-file] [input-file]" +[ -z "$help" ] || { + echo >&2 "Usage: $0 [-o|--output output-file] [input-file]" exit 0 -fi +} infile=$1 if [ -z "$outfile" ]; then @@ -69,7 +69,7 @@ iconv -t utf-8 $infile | pandoc -w latex -s > $TEMP/$BASE.tex ) || exit $? is_target_exists= -if [ -f $BASE.pdf ]; then +if [ -f $outfile ]; then is_target_exists=1 fi