Simplify the creation of hooks

This commit is contained in:
Manuel Thalmann 2024-07-09 03:57:03 +02:00
commit d4fa8f2ebd
2 changed files with 14 additions and 6 deletions
scripts/Common/Scripts

View file

@ -0,0 +1,12 @@
function runHook -S -a name message
if type -q "$name"
if test -n "$message"
echo "$message"
end
"$name"
or exit
else
return 1
end
end