shrub/nix/ops/fakeship/builder.sh

27 lines
381 B
Bash
Raw Normal View History

2019-03-05 03:43:53 +03:00
source $stdenv/setup
set -ex
if [ -z "$ARVO" ]
then
$URBIT -d -F $SHIP -B "$PILL" $out
else
$URBIT -d -F $SHIP -A "$ARVO" -B "$PILL" $out
fi
2019-03-05 03:43:53 +03:00
check () {
[ 3 -eq "$(herb $out -d 3)" ]
2019-03-05 03:43:53 +03:00
}
if check
then
echo "Boot success." >&2
herb $out -p hood -d '+hood/exit' || true
2019-03-05 03:43:53 +03:00
else
echo "Boot failure." >&2
kill $(< $out/.vere.lock) || true
exit 1
fi
set +x