diff options
author | David Alexander <opensource@thelonelyghost.com> | 2016-11-11 02:46:00 -0500 |
---|---|---|
committer | Mike Burns <mike@mike-burns.com> | 2016-11-12 16:19:13 -0500 |
commit | bc0d5b63f6c4762b7d39fb32b525f977015ff4b3 (patch) | |
tree | 004ed26a2af69caf3985e0415a84660d9f067136 /share | |
parent | ee6318598939ec0e1c147430bb2cac036a90f754 (diff) |
Run hooks in a defined order
Run the hooks in alphabetical order so that people can more predictably
manage their hooks.
While here, clean up the NEWS.md.in.
Diffstat (limited to 'share')
-rw-r--r-- | share/rcm.sh.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/share/rcm.sh.in b/share/rcm.sh.in index ed5d6f9..f0d3364 100644 --- a/share/rcm.sh.in +++ b/share/rcm.sh.in @@ -131,9 +131,9 @@ run_hooks() { # running these hooks imply some level of trust; surely one doesn't clone somebody # else's dotfiles repository without reviewing the hooks before doing an `rcup`? find "$hook_file" -type f \( \( -user $LOGNAME -perm -100 \) -o -perm -001 \) \ - -exec \ - sh -c 'cd "`dirname $1`" && ./"`basename $1`"' arg0 '{}' \ - \; + | sort | while read file; do + sh -c 'cd "`dirname $1`" && ./"`basename $1`"' arg0 "$file" + done else $DEBUG "no $when-$direction hook present for $dotfiles_dir, skipping" fi |