summaryrefslogtreecommitdiffstats
path: root/remote/lib/run.sh
blob: fdd73116ab06191433b1e20def2403c97afedd65 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
function run_ {
    local output=$(eval source "$@")

    flock -x $0 echo -e "$output"
}

function run {
    if [ $parallel -gt 0 ]; then
        run_ "$@" &
    else
        run_ "$@"
    fi
}