diff options
Diffstat (limited to 'share/rcm.sh.in')
-rw-r--r-- | share/rcm.sh.in | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/share/rcm.sh.in b/share/rcm.sh.in index ea35e47..36b6762 100644 --- a/share/rcm.sh.in +++ b/share/rcm.sh.in @@ -99,3 +99,18 @@ handle_metadata_flags() { $DEBUG "TAGS: $TAGS" $DEBUG "DOTFILES_DIRS: $DOTFILES_DIRS" } + +run_hooks() { + $DEBUG "run_hooks $1 $2" + $DEBUG " with DOTFILES_DIRS: $DOTFILES_DIRS" + local when=$1 + local direction=$2 + + for dotfiles_dir in $DOTFILES_DIRS; do + $DEBUG "hook: $dotfiles_dir/hooks/$when-$direction" + if [ -x "$dotfiles_dir/hooks/$when-$direction" ]; then + $VERBOSE "running $when-$direction hooks for $dotfiles_dir" + $dotfiles_dir/hooks/$when-$direction + fi + done +} |