On 05/25/13 05:12, Stuart Henderson wrote: > On 2013/05/25 03:47, Stuart Cassoff wrote: >>> instead of "#!/usr/bin/env ..." trick; >> >> It's not a trick, it's a perfectly cromulent way to start a script >> and some people write their scripts like that. > > Using the full path protects against certain cases of blundering > numbskullery where PATH might have been dangerously embiggened.. >
Decreased flexibility makes it harder to experiment, which is why I resisted the change. * full-pathed the env * removed leading / from bin * voted for kang Index: tcl.port.mk =================================================================== RCS file: /cvs/ports/lang/tcl/tcl.port.mk,v retrieving revision 1.14 diff -u -p -u -p -r1.14 tcl.port.mk --- tcl.port.mk 2 Feb 2013 11:15:33 -0000 1.14 +++ tcl.port.mk 25 May 2013 09:31:09 -0000 @@ -34,9 +34,10 @@ MODTCL_WANTLIB ?= ${MODTCL_LIB} # Set 'tclsh' for executable scripts (in-place modification). MODTCL_TCLSH_ADJ = perl -pi \ - -e '$$. == 1 && s!env (tclsh|wish).*$$!env tclsh${MODTCL_VERSION}!;' \ - -e '$$. >= 3 && $$. <= 30 && s!exec (tclsh|wish).*$$!exec tclsh${MODTCL_VERSION} "\$$0" \$${1+"\$$@"}!;' \ - -e 'close ARGV if eof;' + -e '$$. == 1 && s!\S*/env\s+(tclsh|wish)\S*(\s+.+)?$$!/usr/bin/env ${MODTCL_BIN}$$2!;' \ + -e '$$. == 1 && s!\S*bin/(tclsh|wish)\S*(\s+.+)?$$!${MODTCL_BIN}$$2!;' \ + -e '$$. >= 3 && $$. <= 30 && s!exec\s+(tclsh|wish).*$$!exec ${MODTCL_BIN} "\$$0" \$${1+"\$$@"}!;' \ + -e 'close ARGV if eof;' # Set 'wish' for executable scripts (in-place modification). MODTCL_WISH_ADJ = ${MODTCL_TCLSH_ADJ:S/tclsh${MODTCL_VERSION}/wish${MODTCL_VERSION}/}