Check if the input file exist

Previously I checked only if the folder in which the input file should
be exists
This commit is contained in:
fritz-hh
2014-09-25 22:03:45 +02:00
parent d510e7e4ae
commit 1a13b7c85f
+3 -2
View File
@@ -119,9 +119,10 @@ if [ "$#" -ne "2" ]; then
exit $EXIT_BAD_ARGS
fi
! absolutePath "$1" > /dev/null \
&& echo "The folder in which the input file should be located does not exist. Exiting..." && exit $EXIT_BAD_ARGS
[ ! -f "$1" ] \
&& echo "The input file does not exist. Exiting..." && exit $EXIT_BAD_ARGS
FILE_INPUT_PDF="`absolutePath "$1"`"
! absolutePath "$2" > /dev/null \
&& echo "The folder in which the output file should be generated does not exist. Exiting..." && exit $EXIT_BAD_ARGS
FILE_OUTPUT_PDFA="`absolutePath "$2"`"