tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

handle #! /usr/bin/env



I would like to do this:
--- replace-interpreter.mk-orig 2013-03-02 09:29:51.000000000 -0500
+++ replace-interpreter.mk      2013-03-02 10:02:04.000000000 -0500
@@ -99,7 +99,7 @@
        cd ${WRKSRC};                                                   \
        for f in ${REPLACE_FILES.${_lang_}}; do                         \
                if [ -f "$${f}" ]; then                                 \
-                       ${SED} -e
'1s|^#![[:space:]]*${REPLACE.${_lang_}.old}|#!${REPLACE.${_lang_}.new}|'
\
+                       ${SED} -e
'1s|^#![[:space:]]*/[^/]*/bin/env|#!|' -e
'1s|^#![[:space:]]*${REPLACE.${_lang_}.old}|#!${REPLACE.${_lang_}.new}|'
\
                        < "$${f}" > "$${f}.new";                        \
                        if [ -x "$${f}" ]; then                         \
                                ${CHMOD} a+x "$${f}.new";               \


which will allow REPLACE_* to handle /usr/bin/env

I know this has been brought up before, but I don't see the issue with this,
Matt


Home | Main Index | Thread Index | Old Index