aboutsummaryrefslogtreecommitdiff
path: root/markdown2pdf
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-11-15 04:47:44 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-11-15 04:47:44 +0000
commitd5d81b0b53174143fa19e17bf77c0d55b9a90d7a (patch)
tree2eefd2fc367dc900ad12e4007be7385487bf0595 /markdown2pdf
parent8c888ea22c2fe69a068cda26e2ef63e833196bbf (diff)
downloadpandoc-d5d81b0b53174143fa19e17bf77c0d55b9a90d7a.tar.gz
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
Diffstat (limited to 'markdown2pdf')
-rw-r--r--markdown2pdf5
1 files changed, 5 insertions, 0 deletions
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!"