PortValhalla/scripts/Common/Scripts/hooks.sh

17 lines
208 B
Bash
Raw Normal View History

2024-03-23 16:23:45 +00:00
#!/bin/bash
function runHook() {
2024-03-24 04:35:13 +00:00
command="${@:2}";
2024-03-23 16:23:45 +00:00
function fallback() {
2024-03-24 04:35:13 +00:00
$command;
2024-03-23 16:23:45 +00:00
}
if command -v $1 > /dev/null
then
$1 fallback;
else
fallback;
fi;
}