Files
scm_breeze/install.sh
Andrew Lorente bf5d50fcb8 Remove restrictions on directory for scm-breeze
Previously the script had to be installed to ~/.scm_breeze. Now it can
live anywhere!
2011-10-20 11:27:31 -07:00

24 lines
702 B
Bash
Executable File

#!/bin/bash
#locate the dir where this script is stored
scmbDir="$(dirname "$0")"
# This loads SCM Breeze into the shell session.
exec_string='[[ -s "$scmbDir/scm_breeze.sh" ]] && . "$scmbDir/scm_breeze.sh"'
# Add line to bashrc and zshrc if not already present.
for rc in bashrc zshrc; do
if [[ -s "$HOME/.$rc" ]] && ! grep -q "$exec_string" "$HOME/.$rc"; then
echo -e "\n$exec_string" >> "$HOME/.$rc"
echo "== Added SCM Breeze to '~/.$rc'"
fi
done
# Load SCM Breeze update scripts
. "$scmbDir/lib/scm_breeze.sh"
# Create '~/.*.scmbrc' files from example files
_create_or_patch_scmbrc
echo "== Run 'source ~/.bashrc' or 'source ~/.zshrc' to load SCM Breeze into your current shell."