Create a script for running hooks

This commit is contained in:
Manuel Thalmann 2024-03-23 17:23:45 +01:00
parent 17a4af37d8
commit bb9f94a354
2 changed files with 15 additions and 13 deletions
scripts/Common/Scripts

14
scripts/Common/Scripts/hooks.sh Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
function runHook() {
function fallback() {
${@:2};
}
if command -v $1 > /dev/null
then
$1 fallback;
else
fallback;
fi;
}