pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk extend REPLACE_INTERPRETER to accept shell wildcards



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6276bf1958cf
branches:  trunk
changeset: 469899:6276bf1958cf
user:      drochner <drochner%pkgsrc.org@localhost>
date:      Tue Mar 02 15:25:23 2004 +0000

description:
extend REPLACE_INTERPRETER to accept shell wildcards

diffstat:

 mk/bsd.pkg.mk |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 13805c73dda4 -r 6276bf1958cf mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Tue Mar 02 15:23:37 2004 +0000
+++ b/mk/bsd.pkg.mk     Tue Mar 02 15:25:23 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1414 2004/02/28 07:12:21 jdolecek Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1415 2004/03/02 15:25:23 drochner Exp $
 #
 # This file is in the public domain.
 #
@@ -2330,11 +2330,12 @@
 .PHONY: replace-interpreter
 replace-interpreter:
 .  for lang in ${REPLACE_INTERPRETER}
+.    for pattern in ${_REPLACE_FILES.${lang}}
        ${_PKG_SILENT}${_PKG_DEBUG}                                     \
        cd ${WRKSRC};                                                   \
-       for f in ${_REPLACE_FILES.${lang}}; do                          \
+       for f in ${pattern}; do                                         \
            if [ -f $${f} ]; then                                       \
-                   ${SED} -e 's|#!${_REPLACE.${lang}.old}|#!${_REPLACE.${lang}.new}|' \
+                   ${SED} -e '1s|^#!${_REPLACE.${lang}.old}|#!${_REPLACE.${lang}.new}|' \
                            $${f} > $${f}.new;                          \
                    if [ -x $${f} ]; then                               \
                            ${CHMOD} a+x $${f}.new;                     \
@@ -2342,6 +2343,7 @@
                    ${MV} -f $${f}.new $${f};                           \
            fi;                                                         \
        done
+.    endfor
 .  endfor
 .endif
 



Home | Main Index | Thread Index | Old Index