Fixed programs without extensions to install to user directory

Necessary to ensure the Homebrew directory remains clean and is *only* managed by Homebrew. All other programs are downloaded straight from the provider and placed in the `/usr/local/bin` instead.
This commit is contained in:
Brooke Kuhlmann
2023-02-25 08:51:41 -07:00
parent 017f79442b
commit 2f0fa77831

View File

@@ -77,18 +77,10 @@ export -f get_install_path
# Parameters: $1 (required) - The file name. # Parameters: $1 (required) - The file name.
get_install_root() { get_install_root() {
local file_name="$1" local file_name="$1"
local file_extension=$(get_extension "$file_name")
# Special cases not supported by Homebrew. case $(get_extension "$file_name") in
if [[ "$file_name" == "elm" ]]; then
printf "/usr/local/bin"
return
fi
# Dynamically build the install path based on file extension.
case $file_extension in
'') '')
printf "$(get_homebrew_bin_root)";; printf "/usr/local/bin";;
'app') 'app')
printf "/Applications";; printf "/Applications";;
'prefPane') 'prefPane')