From dc2d7c10c44eeec9295c0de3738eadcaa6379530 Mon Sep 17 00:00:00 2001 From: Mitchell Ludwig Date: Thu, 21 Nov 2019 11:21:13 -0700 Subject: [PATCH] Adding check for script directory --- bin/autojump.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/autojump.sh b/bin/autojump.sh index 0ddff47..cfb90dd 100644 --- a/bin/autojump.sh +++ b/bin/autojump.sh @@ -23,4 +23,11 @@ elif [ -s ~/.autojump/share/autojump/autojump.${shell} ]; then # check global install elif [ -s /usr/local/share/autojump/autojump.${shell} ]; then source /usr/local/share/autojump/autojump.${shell} +else + SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + if [ -s "$SCRIPT_DIR/autojump.${shell}" ]; then + source "$SCRIPT_DIR/autojump.${shell}" + else + echo "ERROR: autojump not found" + fi fi