From 821097eec9ee3314c29ef6adc128a489a7f2d16b Mon Sep 17 00:00:00 2001 From: Tobbe Lundberg Date: Sun, 19 Nov 2023 11:31:30 +0100 Subject: [PATCH 1/2] Uninstall: lowercase "darwin" on MacOS --- uninstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uninstall.sh b/uninstall.sh index a0b6ba87..a4cbeb99 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -3,7 +3,7 @@ # Remove line from bashrc and zshrc if present. sed="sed -i" -if [[ $OSTYPE == "Darwin" ]]; then +if [[ $OSTYPE == "Darwin" || $OSTYPE == *"darwin"* ]]; then sed="sed -i ''" fi From b94ff0280268143fa990fcbd533e95ce2378aa8f Mon Sep 17 00:00:00 2001 From: Will Owens Date: Tue, 27 Feb 2024 06:25:26 -0500 Subject: [PATCH 2/2] fix: lets compare just lowercased versions of uname output --- uninstall.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/uninstall.sh b/uninstall.sh index a4cbeb99..14ff1dc5 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -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