diff options
author | amdmi3 <amdmi3@FreeBSD.org> | 2017-07-14 20:47:55 +0800 |
---|---|---|
committer | amdmi3 <amdmi3@FreeBSD.org> | 2017-07-14 20:47:55 +0800 |
commit | d3adf32e094abba8c1e7deffe33a0ce342d11eed (patch) | |
tree | 9800c38386f3e893d8b922d7ee5bad688d237001 /Mk | |
parent | b93744437da86c61b8f4afe4d3df5529f301c31a (diff) | |
download | freebsd-ports-gnome-d3adf32e094abba8c1e7deffe33a0ce342d11eed.tar.gz freebsd-ports-gnome-d3adf32e094abba8c1e7deffe33a0ce342d11eed.tar.zst freebsd-ports-gnome-d3adf32e094abba8c1e7deffe33a0ce342d11eed.zip |
- 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
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Uses/shebangfix.mk | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Mk/Uses/shebangfix.mk b/Mk/Uses/shebangfix.mk index 6ae6d8d0e96e..c2543e72af90 100644 --- a/Mk/Uses/shebangfix.mk +++ b/Mk/Uses/shebangfix.mk @@ -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 |