diff options
-rw-r--r-- | share/rcm.sh.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/share/rcm.sh.in b/share/rcm.sh.in index 9f69e56..6d8a7e0 100644 --- a/share/rcm.sh.in +++ b/share/rcm.sh.in @@ -112,6 +112,7 @@ run_hooks() { local when="$1" local direction="$2" local hook_file + local find_opts= if [ $RUN_HOOKS -eq 1 ]; then for dotfiles_dir in $DOTFILES_DIRS; do @@ -119,7 +120,12 @@ run_hooks() { if [ -e "$hook_file" ]; then $VERBOSE "running $when-$direction hooks for $dotfiles_dir" - find "$hook_file" -type f -perm -111 -print -exec {} \; + + if [ x$DEBUG != x: ]; then + find_opts=-print + fi + + find "$hook_file" -type f -perm -111 $find_opts -exec {} \; else $DEBUG "no $when-$direction hook present for $dotfiles_dir, skipping" fi |