summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorGravatar Mike Burns <mike@mike-burns.com>2013-08-16 17:41:10 +0200
committerGravatar Mike Burns <mike@mike-burns.com>2013-08-16 17:41:10 +0200
commit971a2f9e5b2bcbfd0e1589dbd0dd602f7e2cd1c9 (patch)
treec39dd29f6aef2ece5be6a60ad1be18e149f3dbcc /share
parent975b347b7206a0e9caeeea8349e4765b4db654f9 (diff)
Add -kK for rcup and rcdn
The hooks can be skipped using `-K`, if needed and they can be forced with the `-k` flag.
Diffstat (limited to 'share')
-rw-r--r--share/rcm.sh.in16
1 files changed, 9 insertions, 7 deletions
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
}