Browse Source

Checks if input file exists and displays error message if not found

master
Gustavo Neves 8 years ago
parent
commit
7809a8d36e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      pdfScale.sh

+ 1
- 1
pdfScale.sh View File

@@ -669,7 +669,7 @@ vprint " Scale factor: $SCALE"
[[ $# -lt 1 ]] && { usage; exit 1; }
INFILEPDF="$1"
[[ "$INFILEPDF" =~ ^..*\.pdf$ ]] || { usage; exit 2; }
[[ -f "$INFILEPDF" ]] || { echo "Error! File not found: $INFILEPDF"; usage; exit 2; }
[[ -f "$INFILEPDF" ]] || { echo "Error! File not found: $INFILEPDF"; exit 3; }
vprint " Input file: $INFILEPDF"




Loading…
Cancel
Save