aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2020-02-07 00:43:52 +0800
committerMateusz Piotrowski <0mp@FreeBSD.org>2020-02-07 00:43:52 +0800
commit15d510f7ba28f9c09a729fd5b63609b54b2e34a2 (patch)
tree1a0a00456310d60947504d427fcb2ef18f1701d4 /Mk
parent80c874b9f480087376c845ab11acb00d7083c7fb (diff)
downloadfreebsd-ports-gnome-15d510f7ba28f9c09a729fd5b63609b54b2e34a2.tar.gz
freebsd-ports-gnome-15d510f7ba28f9c09a729fd5b63609b54b2e34a2.tar.zst
freebsd-ports-gnome-15d510f7ba28f9c09a729fd5b63609b54b2e34a2.zip
Improve implementation of install-missing-packages
As suggested by mat@ in D23484, let's use a proper if statement here instead of short-circuits operators. Also, arguments to echo should be quoted and ECHO_CMD should be used instead of ECHO (see bsd.commands.mk for details). Reported by: mat Reviewed by: mat Approved by: portmgr Differential Revision: https://reviews.freebsd.org/D23535
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 8d9a1c949210..6c404dc8776d 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -4332,8 +4332,9 @@ missing-packages:
# Install missing dependencies from package
install-missing-packages:
@_dirs=$$(${MISSING-DEPENDS-LIST}); \
- [ -z "$${_dirs}" ] || \
- ${SU_CMD} "${PKG_BIN} install -A $$(${ECHO} $${_dirs} | ${SED} "s%${PORTSDIR}/%%g")"
+ if [ -n "$${_dirs}" ]; then \
+ ${SU_CMD} "${PKG_BIN} install -A $$(${ECHO_CMD} "$${_dirs}" | ${SED} "s%${PORTSDIR}/%%g")"; \
+ fi
################################################################
# Everything after here are internal targets and really