From cae56d8887a7cd62f6a9120dec9c93e3b3cbe797 Mon Sep 17 00:00:00 2001 From: Will Owens Date: Sat, 17 Feb 2024 15:44:31 -0500 Subject: [PATCH] feat: make the asset management optional The environment variable `SCM_BREEZE_DISABLE_ASSETS_MANAGEMENT` when set to anything will disable the asset management portion of the shell integration. --- scm_breeze.sh | 14 +++++++++----- scmbrc.example | 5 +++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/scm_breeze.sh b/scm_breeze.sh index 4d83349b..9f756f85 100644 --- a/scm_breeze.sh +++ b/scm_breeze.sh @@ -9,8 +9,11 @@ export scmbDir="$(dirname ${BASH_SOURCE:-$0})" # Shared functions source "$scmbDir/lib/scm_breeze.sh" -# Design assets management -source "$scmbDir/lib/design.sh" + +if [ ! -z "$SCM_BREEZE_DISABLE_ASSETS_MANAGEMENT" ]; then + # Design assets management + source "$scmbDir/lib/design.sh" +fi # Git # ------------------------------------------------------------ @@ -24,13 +27,14 @@ if [[ -s "$HOME/.git.scmbrc" ]]; then source "$scmbDir/lib/git/branch_shortcuts.sh" source "$scmbDir/lib/git/grep_shortcuts.sh" source "$scmbDir/lib/git/shell_shortcuts.sh" - source "$scmbDir/lib/git/repo_index.sh" + if [ ! -z "$SCM_BREEZE_DISABLE_ASSETS_MANAGEMENT" ]; then + source "$scmbDir/lib/git/repo_index.sh" + fi source "$scmbDir/lib/git/tools.sh" - if ! type ruby > /dev/null 2>&1; then + if ! type ruby >/dev/null 2>&1; then # If Ruby is not installed, fall back to the # slower bash/zsh implementation of 'git_status_shortcuts' source "$scmbDir/lib/git/fallback/status_shortcuts_shell.sh" fi fi - diff --git a/scmbrc.example b/scmbrc.example index 3a12d650..5de68a94 100644 --- a/scmbrc.example +++ b/scmbrc.example @@ -11,3 +11,8 @@ export design_av_dirs="Animations Videos Flash Music Samples" # Directories for global design assets (not symlinked into projects) export design_ext_dirs="Fonts IconSets" +# Set =1 to disable the design/assets management features +# Set =0 to enable the design/assets management features +export SCM_BREEZE_DISABLE_ASSETS_MANAGEMENT=1 + +# vi: ft=sh