Mk/Uses/cabal.mk: Replace shell process in EXECUTABLES wrapper scripts

The wrapper scripts leave the shell running for no reason.  Add an
exec to replace the shell process.

Before:
$ ps -d
35230  5  Ss    0:00.09 -oksh (oksh)
35351  5  S+    0:00.00 - /bin/sh /usr/local/bin/shellcheck -
35352  5  S+    0:00.00 `-- /usr/local/libexec/cabal/shellcheck -

After:
$ ps -d
35230  5  Is    0:00.05 -oksh (oksh)
35236  5  I+    0:00.01 - /usr/local/libexec/cabal/shellcheck -

Approved by:	arrowd
Differential Revision:	https://reviews.freebsd.org/D29852
This commit is contained in:
Tobias Kortkamp 2021-04-21 06:34:56 +02:00
parent a0109ed754
commit 12837690ed
No known key found for this signature in database
GPG key ID: A4F09FB73CC51F61

View file

@ -196,7 +196,7 @@ do-install:
${ECHO_CMD} 'export ${dep:S/-/_/}_datadir=${DATADIR}' >> ${STAGEDIR}${PREFIX}/bin/${exe}
. endfor
${ECHO_CMD} '' >> ${STAGEDIR}${PREFIX}/bin/${exe}
${ECHO_CMD} '${PREFIX}/${CABAL_LIBEXEC}/${exe} "$$@"' >> ${STAGEDIR}${PREFIX}/bin/${exe}
${ECHO_CMD} 'exec ${PREFIX}/${CABAL_LIBEXEC}/${exe} "$$@"' >> ${STAGEDIR}${PREFIX}/bin/${exe}
${CHMOD} +x ${STAGEDIR}${PREFIX}/bin/${exe}
. endfor
. endif