#!/bin/sh -e

make
make DESTDIR="$1" PREFIX=/usr install

ln -s minit "$1/usr/bin/init"

install -Dm755 reboot "$1/usr/bin/reboot"
install -Dm755 poweroff "$1/usr/bin/poweroff"
install -Dm644 minit.post.shutdown "$1/etc/init/minit.post.shutdown"