Skip to content

Commit

Permalink
Merge pull request #334 from ghthor/pr/330
Browse files Browse the repository at this point in the history
Uninstall: lowercase "darwin" on MacOS
  • Loading branch information
ghthor authored Feb 27, 2024
2 parents bb7fdaa + b94ff02 commit e0999a1
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" ]]; 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 e0999a1

Please sign in to comment.