scripts/ci/test.sh

21 lines
389 B
Bash
Raw Normal View History

2020-03-26 17:29:06 +01:00
#!/usr/bin/env bash
function call_remote {
local fn="$1"
local args="${@:2}"
2020-03-26 21:03:08 +01:00
ssh -l christian -p 2200 ulrich.earth "$(declare -f $fn); $fn $args"
2020-03-26 17:29:06 +01:00
}
function worker_has_nix {
which nix-env 2>&1 >/dev/null
has_nix_env=$?
which nix-channel 2>&1 >/dev/null
has_nix_channel=$?
[ "$has_nix_env" -eq 0 ] && [ "$has_nix_channel" -eq 0 ]
echo $?
}
call_remote worker_has_nix