From 33a8fefcfca337e478b057ea1b444116b0ce1b14 Mon Sep 17 00:00:00 2001 From: joachimschmidt557 Date: Wed, 6 Nov 2019 12:08:18 +0100 Subject: [PATCH] Add file exists check to nope --- nope | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nope b/nope index fa79926..bea3375 100755 --- a/nope +++ b/nope @@ -13,7 +13,12 @@ Flags: EOF } -case "$@" in +if ! [ -f "$1" ] ; then + echo "File does not exist!" + exit 1 +fi + +case "$1" in --help) usage exit 1