From c19734bb7acd33e27fb28fb1ebb84b5270aac8c5 Mon Sep 17 00:00:00 2001 From: luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> Date: Fri, 7 Jan 2022 11:09:13 -0500 Subject: Improvements to error messages. --- install.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'install.sh') diff --git a/install.sh b/install.sh index a258c46..54aa66e 100755 --- a/install.sh +++ b/install.sh @@ -17,7 +17,15 @@ if [ "$1" != "" ]; then if [ -d "../$1" ]; then echo "Target directory does not exist. Did you mean to do \"./install.sh ../$1\"?" else - echo "Target directory does not exist. If you aren't familiar with relative paths, make sure that agbcc and $1 are in the same directory, and run \"./install.sh ../$1\" again." + if case $1 in ".."*) true;; *) false;; esac; then + echo "Target directory does not exist. If you aren't familiar with relative paths, make sure that agbcc and the repository are in the same directory, and run \"./install.sh $1\" again." + else + if echo "$1" | grep -qE '^[^/]*.$'; then + echo "Target directory does not exist. You probably meant to do \"./install.sh ../$1\", but agbcc and $1 do not exist in the same directory. Check your spelling, make sure that the repository has been cloned, ensure that agbcc and the repository are in the same directory, and run \"./install.sh ../$1\" again." + else + echo "Target directory does not exist. Check your spelling, re-read the instructions, and try again." + fi + fi fi fi else -- cgit v1.2.3