Skip to content

Commit

Permalink
fix: lets compare just lowercased versions of uname output
Browse files Browse the repository at this point in the history
  • Loading branch information
ghthor committed Feb 27, 2024
1 parent 0cf557c commit b94ff02
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
# uninstall by (github: bernardofire)
# Remove line from bashrc and zshrc if present.

OS=$(uname -s | awk '{print tolower($0)}')

sed="sed -i"
if [[ $OSTYPE == "Darwin" || $OSTYPE == *"darwin"* ]]; then
if [[ "$OS" == "darwin" ]]; then
sed="sed -i ''"
fi

if [ -f "$HOME/.bashrc" ]; then
$sed '/scm_breeze/d' "$HOME/.bashrc" &&
printf "Removed SCM Breeze from '%s'\n" "$HOME/.bashrc"
printf "Removed SCM Breeze from '%s'\n" "$HOME/.bashrc"
fi

if [ -f "${ZDOTDIR:-$HOME}/.zshrc" ]; then
$sed '/scm_breeze/d' "${ZDOTDIR:-$HOME}/.zshrc" &&
printf "Removed SCM Breeze from '%s'\n" "${ZDOTDIR:-$HOME}/.zshrc"
printf "Removed SCM Breeze from '%s'\n" "${ZDOTDIR:-$HOME}/.zshrc"
fi

0 comments on commit b94ff02

Please sign in to comment.