Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove restrictions on directory for scm-breeze

Previously the script had to be installed to ~/.scm_breeze. Now it can
live anywhere!
  • Loading branch information...
commit bf5d50fcb856502fe825dbe4a92717465ec59ee3 1 parent 51d3ad0
Andrew Lorente authored
Showing with 6 additions and 3 deletions.
  1. +5 −2 install.sh
  2. +1 −1  lib/scm_breeze.sh
View
7 install.sh
@@ -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
2  lib/scm_breeze.sh
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.