#!/bin/sh

# Assuming /usr/src is populated, this will build and
# install userland.
#
# It doesn't update the repo first. If you want that, run:
#
#	cd /usr/src && cvs up -Pd


set -e

cd /usr/src
doas rm -rf /usr/obj/*
make obj
cd /usr/src/etc
doas env DESTDIR=/ make distrib-dirs
cd /usr/src
doas make -j2 build
