From: Alexander Barton Date: Wed, 8 Apr 2015 12:03:41 +0000 (+0200) Subject: Make sure that source script exists and target app does not X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=appify.git;a=commitdiff_plain;h=f23850b38ed51ecae95beda6fe796fdb92124ba1 Make sure that source script exists and target app does not --- diff --git a/appify.sh b/appify.sh index a5fe284..a7db786 100755 --- a/appify.sh +++ b/appify.sh @@ -47,8 +47,13 @@ TARGET=$2 BASENAME=`basename "$SCRIPT"` +if [ ! -r "$SCRIPT" ]; then + echo "$SCRIPT isn't readable!" 1>&2 + exit 3 +fi + if [ -e "$TARGET" ]; then - echo "$TARGET exists, exiting" 1>&2 + echo "$TARGET exists!" 1>&2 exit 3 fi