Merge pull request #334 from ghthor/pr/330

Uninstall: lowercase "darwin" on MacOS
This commit is contained in:
Will Owens
2024-02-27 08:00:16 -05:00
committed by GitHub

View File

@@ -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