diff --git a/lib/setupScriptFunctions.sh b/lib/setupScriptFunctions.sh index b7252a6..904912c 100755 --- a/lib/setupScriptFunctions.sh +++ b/lib/setupScriptFunctions.sh @@ -153,19 +153,13 @@ brewCleanup () { # This is where brew stores its binary symlinks binroot="$(brew --config | awk '/HOMEBREW_PREFIX/ {print $2}')"/bin - # htop - if [[ "$(type -P $binroot/htop)" && "$(stat -L -f "%Su:%Sg" "$binroot/htop")" != "root:wheel" || ! "$(($(stat -L -f "%DMp" "$binroot/htop") & 4))" ]]; then - header "Updating htop permissions" - sudo chown root:wheel "$binroot/htop" - sudo chmod u+s "$binroot/htop" - fi - if [[ "$(type -P $binroot/bash)" && "$(cat /etc/shells | grep -q "$binroot/bash")" ]]; then - header "Adding $binroot/bash to the list of acceptable shells" + if [[ "$(type -P ${binroot}/bash)" && "$(cat /etc/shells | grep -q "$binroot/bash")" ]]; then + info "Adding ${binroot}/bash to the list of acceptable shells" echo "$binroot/bash" | sudo tee -a /etc/shells >/dev/null fi - if [[ "$SHELL" != "$binroot/bash" ]]; then - header "Making $binroot/bash your default shell" - sudo chsh -s "$binroot/bash" "$USER" >/dev/null 2>&1 + if [[ "$SHELL" != "${binroot}/bash" ]]; then + info "Making ${binroot}/bash your default shell" + sudo chsh -s "${binroot}/bash" "$USER" >/dev/null 2>&1 success "Please exit and restart all your shells." fi brew cleanup