Don't allow a directory to be selected
The `-e` flag checks for a file _or_ a directory of that name. The `-f` flag checks only for files.
This commit is contained in:
parent
c40b443072
commit
2229ae89a6
|
@ -19,7 +19,7 @@ img="$1"
|
|||
if [[ -z "$img" ]]; then
|
||||
usage
|
||||
fi
|
||||
if [[ ! -e "$img" ]]; then
|
||||
if [[ ! -f "$img" ]]; then
|
||||
echo "ERROR: $img is not a file..."
|
||||
exit -2
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue