#!/bin/bash

function runHook() {
    command="${@:2}";

    function fallback() {
        $command;
    }

    if command -v $1 > /dev/null
    then
        $1 fallback;
    else
        fallback;
    fi;
}