aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorfeld <feld@FreeBSD.org>2017-08-08 09:10:57 +0800
committerfeld <feld@FreeBSD.org>2017-08-08 09:10:57 +0800
commit6dffbe92a431c1d3d5b54b7b5c62c8880f3a971a (patch)
treef5df69ff81995c40a5dc2203184c3df4e471cb9f /Mk
parent897107141b26be403ee72d5dc95269aa20159439 (diff)
downloadfreebsd-ports-gnome-6dffbe92a431c1d3d5b54b7b5c62c8880f3a971a.tar.gz
freebsd-ports-gnome-6dffbe92a431c1d3d5b54b7b5c62c8880f3a971a.tar.zst
freebsd-ports-gnome-6dffbe92a431c1d3d5b54b7b5c62c8880f3a971a.zip
Mk/Uses/shebangfix.mk: Fix SHEBANG_FILES to use find(1)
Ports like net/vmware-vsphere-cli use SHEBANG_FILES with globs like so: SHEBANG_FILES= bin/* ... As of FreeBSD 11.1-RELEASE sed has changed and errors if attempted on non-file objects. In the case of the cited port there are many other files in the bin/ directory which are symlinks for compatibility with old scripts. This causes the port patching to fail. PR: 221229 Differential Revision: https://reviews.freebsd.org/D11853
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/shebangfix.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/Mk/Uses/shebangfix.mk b/Mk/Uses/shebangfix.mk
index c2543e72af90..5cf726ee499e 100644
--- a/Mk/Uses/shebangfix.mk
+++ b/Mk/Uses/shebangfix.mk
@@ -94,7 +94,8 @@ fix-shebang:
.endif
.if defined(SHEBANG_FILES)
@cd ${WRKSRC}; \
- ${ECHO_CMD} ${SHEBANG_FILES} | ${XARGS} ${SED} -i '' ${_SHEBANG_REINPLACE_ARGS}
+ ${FIND} ${SHEBANG_FILES} -type f \
+ -exec ${SED} -i '' ${_SHEBANG_REINPLACE_ARGS} {} +
.endif
.endif