File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ asave () {
47
47
afind () {
48
48
find " $@ " -exec sh -c " for i do printf %s\\\\ n \"\$ {i}\" \\
49
49
| sed \" s/'/'\\\\\\\\ ''/g;1s/^/'/;\\\$ s/\\\$ /' \\\\\\\\ /\"
50
- done" dummy ' {}' +
50
+ done; printf '%s\n' ' ' " dummy ' {}' +
51
51
}
52
52
53
53
# Remove trailing and squeeze multiple '/'
@@ -96,15 +96,15 @@ wrapper() {
96
96
exit 0
97
97
else
98
98
args=$( asave " ${@ } " )
99
- eval " set -- $( afind " ${hook_d} " -maxdepth 1 -type f | sort -n) "
99
+ eval " set -- $( afind " ${hook_d} " -maxdepth 1 -type f | sort -n | sed ' /^[[:space:]]*$/d ' ; printf ' %s\n ' ' ' ) "
100
100
[ " $# " -eq 0 ] && printf " ${TAG} : %s\n" " Empty '$( basename -- " ${hook_d} " ) ', nothing to do..."
101
101
for file; do
102
102
if [ -s ${file} ] && [ -x ${file} ]; then
103
103
printf " ${TAG} : %s\n" " Running '$( basename -- " ${file} " ) '..." # "Args: ${*}"
104
104
(eval " set -- ${args} " ; " ${file} " " ${@ } " ); err=$?
105
105
[ ${err} -ne 0 ] && printf " ${TAG} : %s\n" " ...Failed with '${err} '" >&2 && exit ${err}
106
106
else
107
- printf " ${TAG} : %s\n" " Empty/non-exec $ {file} , ignoring..."
107
+ printf " ${TAG} : %s\n" " Empty/non-exec ' $( basename -- " $ {file}" ) ' , ignoring..."
108
108
continue
109
109
fi
110
110
done
You can’t perform that action at this time.
0 commit comments