aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2011-03-20 05:30:34 +0800
committerpav <pav@FreeBSD.org>2011-03-20 05:30:34 +0800
commitf600f192d0d2a1d2687baf0858d4f456367c7607 (patch)
tree07f83bd4beeaebf58715cbb71070cca12985d7a1 /Mk
parenta434b743ac69da039ffc9603b479e214d6f74d2a (diff)
downloadfreebsd-ports-gnome-f600f192d0d2a1d2687baf0858d4f456367c7607.tar.gz
freebsd-ports-gnome-f600f192d0d2a1d2687baf0858d4f456367c7607.tar.zst
freebsd-ports-gnome-f600f192d0d2a1d2687baf0858d4f456367c7607.zip
- Use ${UID} instead of calling ${ID} -u
PR: ports/155543 Submitted by: Eitan Adler <lists@eitanadler.com>
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk10
1 files changed, 5 insertions, 5 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index cee5b8fb519d..239a6c044475 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3647,7 +3647,7 @@ do-extract:
fi; \
done
.if !defined(EXTRACT_PRESERVE_OWNERSHIP)
- @if [ `${ID} -u` = 0 ]; then \
+ @if [ ${UID} = 0 ]; then \
${CHMOD} -R ug-s ${WRKDIR}; \
${CHOWN} -R 0:0 ${WRKDIR}; \
fi
@@ -4068,7 +4068,7 @@ check-umask:
.if !target(install-mtree)
install-mtree:
@${MKDIR} ${PREFIX}
- @if [ `${ID} -u` != 0 ]; then \
+ @if [ ${UID} != 0 ]; then \
if [ -w ${PREFIX}/ ]; then \
${ECHO_MSG} "Warning: not superuser, you may get some errors during installation."; \
else \
@@ -4077,7 +4077,7 @@ install-mtree:
fi; \
fi
.if !defined(NO_MTREE)
- @if [ `${ID} -u` = 0 ]; then \
+ @if [ ${UID} = 0 ]; then \
if [ ! -f ${MTREE_FILE} ]; then \
${ECHO_MSG} "Error: mtree file \"${MTREE_FILE}\" is missing."; \
${ECHO_MSG} "Copy it from a suitable location (e.g., /usr/src/etc/mtree) and try again."; \
@@ -6127,7 +6127,7 @@ config:
${ECHO_CMD} WITHOUT_$${i}=true >> $${TMPOPTIONSFILE}; \
fi; \
done; \
- if [ `${ID} -u` != 0 -a "x${INSTALL_AS_USER}" = "x" ]; then \
+ if [ ${UID} != 0 -a "x${INSTALL_AS_USER}" = "x" ]; then \
${ECHO_MSG} "===> Switching to root credentials to write ${OPTIONSFILE}"; \
${SU_CMD} "${CAT} $${TMPOPTIONSFILE} > ${OPTIONSFILE}"; \
${ECHO_MSG} "===> Returning to user credentials"; \
@@ -6220,7 +6220,7 @@ rmconfig:
.if defined(OPTIONS) && exists(${OPTIONSFILE})
-@${ECHO_MSG} "===> Removing user-configured options for ${PKGNAME}"; \
optionsdir=${OPTIONSFILE}; optionsdir=$${optionsdir%/*}; \
- if [ `${ID} -u` != 0 -a "x${INSTALL_AS_USER}" = "x" ]; then \
+ if [ ${UID} != 0 -a "x${INSTALL_AS_USER}" = "x" ]; then \
${ECHO_MSG} "===> Switching to root credentials to remove ${OPTIONSFILE} and $${optionsdir}"; \
${SU_CMD} "${RM} -f ${OPTIONSFILE} ; \
${RMDIR} $${optionsdir}"; \