Merge pull request #20 from bernardofire/master

add uninstall script
This commit is contained in:
Nathan B
2012-04-05 00:52:49 -07:00
3 changed files with 15 additions and 2 deletions

View File

@@ -278,8 +278,14 @@ source ~/.bashrc # or source ~/.zshrc
(The install script simply appends the following line to your `.bashrc` or `.zshrc`): (The install script simply appends the following line to your `.bashrc` or `.zshrc`):
`[ -s "$HOME/.scm_breeze/scm_breeze.sh" ] && . "$HOME/.scm_breeze/scm_breeze.sh"` `[ -s "$HOME/.scm_breeze/scm_breeze.sh" ] && source "$HOME/.scm_breeze/scm_breeze.sh"`
# Uninstall
~/.scm_breeze/uninstall.sh
(The install script simply remove the add line from your `.bashrc` or `.zshrc`):
`[ -s "$HOME/.scm_breeze/scm_breeze.sh" ] && source "$HOME/.scm_breeze/scm_breeze.sh"`
# Configuration # Configuration

View File

@@ -8,7 +8,7 @@ if [ "$scmbDir" != "$HOME/.scm_breeze" ]; then
fi fi
# This loads SCM Breeze into the shell session. # This loads SCM Breeze into the shell session.
exec_string="[ -s \"$HOME/.scm_breeze/scm_breeze.sh\" ] && . \"$HOME/.scm_breeze/scm_breeze.sh\"" exec_string="[ -s \"$HOME/.scm_breeze/scm_breeze.sh\" ] && source \"$HOME/.scm_breeze/scm_breeze.sh\""
# Add line to bashrc and zshrc if not already present. # Add line to bashrc and zshrc if not already present.
for rc in bashrc zshrc; do for rc in bashrc zshrc; do

7
uninstall.sh Executable file
View File

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