Until I teach bsd.*.mk to accept NO_ROOT, make this script only accept root users

This commit is contained in:
Enji Cooper 2014-11-27 07:33:50 +00:00
parent 7e8bf5690f
commit ee0d2af8e2

View File

@ -6,6 +6,12 @@
#
# $FreeBSD$
# NO_ROOT doesn't seem to work at a non-installworld, etc level yet
if [ $(id -u) -ne 0 ]; then
echo "${0##*/}: ERROR: this script must be run as root"
exit 1
fi
: ${TMPDIR=/tmp}
DESTDIR=$(mktemp -d $TMPDIR/tmp.XXXXXX) || exit