kiss: make KISS_HOOK generic again, also skip empty tokens. Closes #229

This commit is contained in:
Dylan Araps 2021-07-14 20:25:33 +03:00
parent 509d911236
commit 4ebbfc094f
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

16
kiss
View File

@ -120,18 +120,10 @@ run_hook() {
unset IFS
for hook do case $hook in
*/*)
# Absolute path to hook.
"$hook" "$_type" "$_name" "$_path"
;;
*)
# Hook in system-wide hook directory (/var/db/kiss/hooks).
# Hooks in this directory can be used via their basename.
"$sys_db/../hooks/$hook" "$_type" "$_name" "$_path"
;;
esac || die "$_name" "$_type hook failed: '$hook'"; done
for hook do case $hook in *?*)
"$hook" "$_type" "$_name" "$_path" ||
die "$_name" "$_type hook failed: '$hook'"
esac done
}
run_hook_pkg() {