aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorasami <asami@FreeBSD.org>1995-06-26 08:30:48 +0800
committerasami <asami@FreeBSD.org>1995-06-26 08:30:48 +0800
commit3f7ad736eb99eefc51abbc623a99bc0fa556f699 (patch)
treea42b3f0e8a3f7c584da09663f7f603cd9d8e015b /Mk
parent7ba9dd0438cbaed8ed15b3fded1da51869de2bb4 (diff)
downloadfreebsd-ports-graphics-3f7ad736eb99eefc51abbc623a99bc0fa556f699.tar.gz
freebsd-ports-graphics-3f7ad736eb99eefc51abbc623a99bc0fa556f699.tar.zst
freebsd-ports-graphics-3f7ad736eb99eefc51abbc623a99bc0fa556f699.zip
Check if uid is 0 before running mtree. If you aren't root, you just
get a message (instead of a bunch of crap from mtree).
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk9
1 files changed, 7 insertions, 2 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index d75bc11187a..d12e5e06b89 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3,7 +3,7 @@
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
#
-# $Id: bsd.port.mk,v 1.166 1995/06/24 10:27:23 asami Exp $
+# $Id: bsd.port.mk,v 1.167 1995/06/25 06:30:51 asami Exp $
#
# Please view me with 4 column tabs!
@@ -775,7 +775,12 @@ install: build ${INSTALL_COOKIE}
${INSTALL_COOKIE}:
@${ECHO_MSG} "===> Installing for ${PKGNAME}"
.if !defined(NO_MTREE)
- @${MTREE_CMD} ${MTREE_ARGS} ${PREFIX}/;
+ @if [ `id -u` = 0 ]; then \
+ ${MTREE_CMD} ${MTREE_ARGS} ${PREFIX}/; \
+ else \
+ echo "Warning: not superuser, can't run mtree."; \
+ echo "Become root and try again to ensure correct permissions."; \
+ fi
.endif
.if target(pre-install)
@${MAKE} ${.MAKEFLAGS} pre-install