drop dirname in favor of native Bash strings (1 of 2)

Convert `var=${dirname $filename)` to `var="${filename%/*}` in cases where there is no ambiguity.

Make sure that the path in `$BASH_IT` is absolute because this path gets embedded in the template `.bash_profile` file if selected by the user.
This commit is contained in:
John D Pell
2021-09-11 23:45:34 -07:00
parent f9de8d170a
commit dee55a03cc
3 changed files with 6 additions and 6 deletions

View File

@@ -184,7 +184,7 @@ if [[ $no_modify_config ]] && [[ $append_to_config ]]; then
exit 1
fi
BASH_IT="$(cd "$(dirname "$0")" && pwd)"
BASH_IT="$(cd "${BASH_SOURCE%/*}" && pwd)"
case $OSTYPE in
darwin*)