Remove restrictions on directory for scm-breeze

Previously the script had to be installed to ~/.scm_breeze. Now it can
live anywhere!
This commit is contained in:
Andrew Lorente
2011-10-20 11:27:31 -07:00
parent 51d3ad0fb8
commit bf5d50fcb8
2 changed files with 6 additions and 3 deletions

View File

@@ -1,6 +1,9 @@
#!/bin/bash
#locate the dir where this script is stored
scmbDir="$(dirname "$0")"
# 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 "$scmbDir/scm_breeze.sh" ]] && . "$scmbDir/scm_breeze.sh"'
# Add line to bashrc and zshrc if not already present.
for rc in bashrc zshrc; do
@@ -11,7 +14,7 @@ for rc in bashrc zshrc; do
done
# Load SCM Breeze update scripts
. "$HOME/.scm_breeze/lib/scm_breeze.sh"
. "$scmbDir/lib/scm_breeze.sh"
# Create '~/.*.scmbrc' files from example files
_create_or_patch_scmbrc

View File

@@ -30,7 +30,7 @@ _create_or_patch_scmbrc() {
for scm in git; do
# Create file from example if it doesn't already exist
if ! [ -e "$HOME/.$scm.scmbrc" ]; then
cp "$HOME/.scm_breeze/$scm.scmbrc.example" "$HOME/.$scm.scmbrc"
cp "$scmbDir/$scm.scmbrc.example" "$HOME/.$scm.scmbrc"
echo "== '~/.$scm.scmbrc' has been created. Please edit this file to change SCM Breeze settings for '$scm'."
# If file exists, attempt to update it with any new settings
elif [ -n "$1" ]; then