From d5d81b0b53174143fa19e17bf77c0d55b9a90d7a Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Wed, 15 Nov 2006 04:47:44 +0000 Subject: Modified markdown2pdf to check that input file exists and is readable, and error exit if not. git-svn-id: https://pandoc.googlecode.com/svn/trunk@103 788f1e2b-df1e-0410-8736-df70ead52e1b --- markdown2pdf | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'markdown2pdf') diff --git a/markdown2pdf b/markdown2pdf index 03d43d472..7799b1077 100644 --- a/markdown2pdf +++ b/markdown2pdf @@ -60,6 +60,11 @@ done infile=$1 +if ! [ -r $infile ]; then + echo >&2 "'$infile' not found" + exit 1 +fi + if [ $# -gt 1 ]; then shift echo >&2 "Warning: extra arguments '$@' will be ignored!" -- cgit v1.2.3