Skip to content

Commit

Permalink
feat: make the asset management optional
Browse files Browse the repository at this point in the history
The environment variable `SCM_BREEZE_DISABLE_ASSETS_MANAGEMENT=true` when set
to will disable the asset management portion of the shell integration.
  • Loading branch information
ghthor committed Feb 27, 2024
1 parent e0999a1 commit 72e31b8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
16 changes: 11 additions & 5 deletions scm_breeze.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,13 @@ export scmbDir="$(dirname ${BASH_SOURCE:-$0})"

# Shared functions
source "$scmbDir/lib/scm_breeze.sh"
# Design assets management
source "$scmbDir/lib/design.sh"

SCM_BREEZE_DISABLE_ASSETS_MANAGEMENT=${SCM_BREEZE_DISABLE_ASSETS_MANAGEMENT:-""}

if [ "$SCM_BREEZE_DISABLE_ASSETS_MANAGEMENT" != "true" ]; then
echo "scm_breeze: Design Assets management enabled"
source "$scmbDir/lib/design.sh"
fi

# Git
# ------------------------------------------------------------
Expand All @@ -24,13 +29,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 [ "$SCM_BREEZE_DISABLE_ASSETS_MANAGEMENT" != "true" ]; 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

4 changes: 4 additions & 0 deletions scmbrc.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ 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 =true to disable the design/assets management features
# export SCM_BREEZE_DISABLE_ASSETS_MANAGEMENT=true

# vi: ft=sh

0 comments on commit 72e31b8

Please sign in to comment.