diff --git a/install.sh b/install.sh index 5134e90..8b33f77 100755 --- a/install.sh +++ b/install.sh @@ -5,7 +5,12 @@ # Source this script in your rc: # source /path/to/here/install.sh -SCRIPT_DIR="$(dirname "$(realpath "$0")")" +# Get script directory for both bash and zsh +if [ -n "$BASH_SOURCE" ]; then + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +else + SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +fi BIN_DIR="$SCRIPT_DIR/bin" ENV_FILE="$SCRIPT_DIR/.env"