- shebangfix: allow to use SHEBANG_REGEX, SHEBANG_GLOB, and SHEBANG_FILES simultaneously

Reported by:	lev
Approved by:	portmgr (mat)
Differential Revision:	https://reviews.freebsd.org/D11572
This commit is contained in:
Dmitry Marakasov 2017-07-14 12:47:55 +00:00
parent fe7dc24bc0
commit c8de8164ca
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=445751

View file

@ -84,13 +84,15 @@ fix-shebang:
@cd ${WRKSRC}; \
${FIND} -E . -type f -iregex '${SHEBANG_REGEX}' \
-exec ${SED} -i '' ${_SHEBANG_REINPLACE_ARGS} {} +
.elif defined(SHEBANG_GLOB)
.for f in ${SHEBANG_GLOB}
.endif
.if defined(SHEBANG_GLOB)
. for f in ${SHEBANG_GLOB}
@cd ${WRKSRC}; \
${FIND} . -type f -name '${f}' \
-exec ${SED} -i '' ${_SHEBANG_REINPLACE_ARGS} {} +
.endfor
.else
. endfor
.endif
.if defined(SHEBANG_FILES)
@cd ${WRKSRC}; \
${ECHO_CMD} ${SHEBANG_FILES} | ${XARGS} ${SED} -i '' ${_SHEBANG_REINPLACE_ARGS}
.endif