summaryrefslogtreecommitdiffstats
path: root/lib/helpers.sh
blob: b562eb65464ef892b1a6b37ae1e16fae030c51e9 (plain)
1
2
3
4
5
6
7
8
9
function in_array() {
    local hay needle=$1
    shift
    for hay; do
        [[ $hay == $needle ]] && return 0
    done

    return 1
}