Merge pull request #257 from ghthor/fix-for-uninstall

Fix uninstall for osx
This commit is contained in:
Wilhelmina Drengwitz
2018-08-31 07:34:51 -04:00
committed by GitHub

View File

@@ -1,7 +1,15 @@
#!/bin/sh #!/bin/sh
# uninstall by (github: bernardofire) # uninstall by (github: bernardofire)
# Remove line from bashrc and zshrc if present. # Remove line from bashrc and zshrc if present.
sed="sed -i"
if [[ $OSTYPE == "Darwin" ]]; then
sed="sed -i ''"
fi
for rc in bashrc zshrc; do for rc in bashrc zshrc; do
sed -i '/scm_breeze/d' "$HOME/.$rc" if [ -f "$HOME/.$rc" ]; then
printf "Removed SCM Breeze from %s\n" "$HOME/.$rc" $sed '/scm_breeze/d' "$HOME/.$rc" &&
printf "Removed SCM Breeze from %s\n" "$HOME/.$rc"
fi
done done