shrub/nix/ops/fakeship/builder.sh

22 lines
307 B
Bash
Raw Normal View History

2019-03-05 03:43:53 +03:00
source $stdenv/setup
set -ex
$URBIT -d -F $SHIP -A "$ARVO" -B "$PILL" $out
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