pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/configure Print a message if REPLACE_INTERPRETER do...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/48d3e603f583
branches:  trunk
changeset: 378895:48d3e603f583
user:      adam <adam%pkgsrc.org@localhost>
date:      Tue Apr 17 09:31:41 2018 +0000

description:
Print a message if REPLACE_INTERPRETER does not change anything (similar to SUBST_)

diffstat:

 mk/configure/replace-interpreter.mk |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r f83d2c79131f -r 48d3e603f583 mk/configure/replace-interpreter.mk
--- a/mk/configure/replace-interpreter.mk       Tue Apr 17 09:03:36 2018 +0000
+++ b/mk/configure/replace-interpreter.mk       Tue Apr 17 09:31:41 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace-interpreter.mk,v 1.15 2018/03/11 15:07:45 rillig Exp $
+# $NetBSD: replace-interpreter.mk,v 1.16 2018/04/17 09:31:41 adam Exp $
 
 # This file provides common templates for replacing #! interpreters
 # in script files.
@@ -107,7 +107,12 @@
                        if [ -x "$${f}" ]; then                         \
                                ${CHMOD} a+x "$${f}.new";               \
                        fi;                                             \
-                       ${MV} -f "$${f}.new" "$${f}";                   \
+                       if ${CMP} -s "$${f}.new" "$${f}"; then          \
+                               ${INFO_MSG} "[replace-interpreter] Nothing changed in $${f}."; \
+                               ${RM} -f "$${f}.new";                   \
+                       else                                            \
+                               ${MV} -f "$${f}.new" "$${f}";           \
+                       fi;                                             \
                elif [ -d "$$f" ]; then                                 \
                        ${SHCOMMENT} "Ignore it, most probably comes from shell globs"; \
                else                                                    \



Home | Main Index | Thread Index | Old Index