pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk/configure



Module Name:    pkgsrc
Committed By:   adam
Date:           Tue Apr 17 09:31:41 UTC 2018

Modified Files:
        pkgsrc/mk/configure: replace-interpreter.mk

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


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/mk/configure/replace-interpreter.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/configure/replace-interpreter.mk
diff -u pkgsrc/mk/configure/replace-interpreter.mk:1.15 pkgsrc/mk/configure/replace-interpreter.mk:1.16
--- pkgsrc/mk/configure/replace-interpreter.mk:1.15     Sun Mar 11 15:07:45 2018
+++ pkgsrc/mk/configure/replace-interpreter.mk  Tue Apr 17 09:31:41 2018
@@ -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 @@ replace-interpreter:
                        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