16 lines
208 B
Bash
Executable file
16 lines
208 B
Bash
Executable file
#!/bin/bash
|
|
|
|
function runHook() {
|
|
command="${@:2}";
|
|
|
|
function fallback() {
|
|
$command;
|
|
}
|
|
|
|
if command -v $1 > /dev/null
|
|
then
|
|
$1 fallback;
|
|
else
|
|
fallback;
|
|
fi;
|
|
}
|