1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Adding check for script directory

This commit is contained in:
Mitchell Ludwig 2019-11-21 11:21:13 -07:00
parent ed103d53c8
commit dc2d7c10c4

View File

@ -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