add _homebrewPath_

This commit is contained in:
Nathaniel Landau
2021-11-12 00:03:45 -05:00
parent bbe2a9e0d4
commit 9c6cca0480
4 changed files with 55 additions and 4 deletions

View File

@@ -81,3 +81,25 @@ _useGNUutils_() {
fi
}
_homebrewPath_() {
# DESC:
# Add homebrew bin dir to PATH
# ARGS:
# None
# OUTS:
# 0 if successful
# 1 if unsuccessful
# PATH: Adds homebrew bin directory to PATH
# USAGE:
# # if ! _homebrewPath_; then exit 1; fi
! declare -f "_setPATH_" &>/dev/null && fatal "${FUNCNAME[0]} needs function _setPATH_"
if _setPATH_ "/usr/local/bin" "/opt/homebrew/bin"; then
return 0
else
return 1
fi
}