etc: Fix distrib-dirs to not rely on a BSDism

FreeBSD and macOS have a test that treats == as an alias for =, but
Linux tends to use GNU coreutils (when not a builtin) which does not.
Use the standard syntax instead for compatibility.

Obtained from:	CheriBSD
Differential Revision:	https://reviews.freebsd.org/D35811
This commit is contained in:
Jessica Clarke 2022-07-15 23:04:16 +01:00
parent 445421abc9
commit 76c100d634

View File

@ -145,7 +145,7 @@ distrib-dirs: ${MTREES:N/*} distrib-cleanup .PHONY
.for _m _d in ${MTREES}
@m=${.CURDIR}/${_m}; \
d=${_d}; \
test "$$d" == "/" && d=""; \
test "$$d" = "/" && d=""; \
d=${DISTBASE}$$d; \
test -d ${DESTDIR}/$$d || mkdir -p ${DESTDIR}/$$d; \
${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K all | " \