fix: lets compare just lowercased versions of uname output
This commit is contained in:
@@ -2,17 +2,19 @@
|
|||||||
# uninstall by (github: bernardofire)
|
# uninstall by (github: bernardofire)
|
||||||
# Remove line from bashrc and zshrc if present.
|
# Remove line from bashrc and zshrc if present.
|
||||||
|
|
||||||
|
OS=$(uname -s | awk '{print tolower($0)}')
|
||||||
|
|
||||||
sed="sed -i"
|
sed="sed -i"
|
||||||
if [[ $OSTYPE == "Darwin" || $OSTYPE == *"darwin"* ]]; then
|
if [[ "$OS" == "darwin" ]]; then
|
||||||
sed="sed -i ''"
|
sed="sed -i ''"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f "$HOME/.bashrc" ]; then
|
if [ -f "$HOME/.bashrc" ]; then
|
||||||
$sed '/scm_breeze/d' "$HOME/.bashrc" &&
|
$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
|
fi
|
||||||
|
|
||||||
if [ -f "${ZDOTDIR:-$HOME}/.zshrc" ]; then
|
if [ -f "${ZDOTDIR:-$HOME}/.zshrc" ]; then
|
||||||
$sed '/scm_breeze/d' "${ZDOTDIR:-$HOME}/.zshrc" &&
|
$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
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user