From 971a2f9e5b2bcbfd0e1589dbd0dd602f7e2cd1c9 Mon Sep 17 00:00:00 2001 From: Mike Burns Date: Fri, 16 Aug 2013 17:41:10 +0200 Subject: Add -kK for rcup and rcdn The hooks can be skipped using `-K`, if needed and they can be forced with the `-k` flag. --- share/rcm.sh.in | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'share') diff --git a/share/rcm.sh.in b/share/rcm.sh.in index 36b6762..e01ec59 100644 --- a/share/rcm.sh.in +++ b/share/rcm.sh.in @@ -106,11 +106,13 @@ run_hooks() { 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 + if [ $RUN_HOOKS -eq 1 ]; then + 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 + fi } -- cgit v1.2.3