From 72dec92d356508b0fe55d9b94b52fc39841e45a4 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Wed, 19 Oct 2011 18:04:54 +0800 Subject: [PATCH] Reorganised code --- lib/git/aliases_and_bindings.sh | 2 +- lib/{_shared.sh => scm_breeze.sh} | 2 ++ scm_breeze.sh | 2 +- test/lib/git/repo_index_test.sh | 2 +- test/lib/git/status_shortcuts_test.sh | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) rename lib/{_shared.sh => scm_breeze.sh} (98%) diff --git a/lib/git/aliases_and_bindings.sh b/lib/git/aliases_and_bindings.sh index a50b3ae..cdd6221 100644 --- a/lib/git/aliases_and_bindings.sh +++ b/lib/git/aliases_and_bindings.sh @@ -1,7 +1,7 @@ # # Set up configured aliases & keyboard shortcuts # -------------------------------------------------------------------- -# _alias() ignores errors if alias is not defined. (from lib/_shared.sh) +# _alias() ignores errors if alias is not defined. (from lib/scm_breeze.sh) _alias $git_alias='git' diff --git a/lib/_shared.sh b/lib/scm_breeze.sh similarity index 98% rename from lib/_shared.sh rename to lib/scm_breeze.sh index bbf3343..43f972c 100644 --- a/lib/_shared.sh +++ b/lib/scm_breeze.sh @@ -17,6 +17,8 @@ update_scm_breeze() { oldHEAD=$(git rev-parse HEAD 2> /dev/null) git pull origin master + source "$scmbDir/lib/scm_breeze.sh" + # Create or attempt to patch '~/.*.scmbrc' files. patchfile=$(mktemp) for scm in git; do diff --git a/scm_breeze.sh b/scm_breeze.sh index ec67508..56bdf9c 100644 --- a/scm_breeze.sh +++ b/scm_breeze.sh @@ -5,7 +5,7 @@ export scmbDir="$(dirname ${BASH_SOURCE:-$0})" # Load shared functions. -. "$scmbDir/lib/_shared.sh" +. "$scmbDir/lib/scm_breeze.sh" # Git # ------------------------------------------------------------ diff --git a/test/lib/git/repo_index_test.sh b/test/lib/git/repo_index_test.sh index b7bc197..005ca56 100755 --- a/test/lib/git/repo_index_test.sh +++ b/test/lib/git/repo_index_test.sh @@ -16,7 +16,7 @@ if [ -n "${ZSH_VERSION:-}" ]; then shell="zsh"; SHUNIT_PARENT=$0; setopt shwords . "$scmbDir/test/support/test_helper" # Load functions to test -. "$scmbDir/lib/_shared.sh" +. "$scmbDir/lib/scm_breeze.sh" . "$scmbDir/lib/git/repo_index.sh" diff --git a/test/lib/git/status_shortcuts_test.sh b/test/lib/git/status_shortcuts_test.sh index baee4a5..612f195 100755 --- a/test/lib/git/status_shortcuts_test.sh +++ b/test/lib/git/status_shortcuts_test.sh @@ -17,7 +17,7 @@ if [ -n "${ZSH_VERSION:-}" ]; then shell="zsh"; SHUNIT_PARENT=$0; setopt shwords . "$scmbDir/test/support/test_helper" # Load functions to test -. "$scmbDir/lib/_shared.sh" +. "$scmbDir/lib/scm_breeze.sh" . "$scmbDir/lib/git/status_shortcuts.sh"