aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2020-08-03 13:53:06 +0000
committerMathieu Arnold <mat@FreeBSD.org>2020-08-03 13:53:06 +0000
commit466a092fb2fb619f5348dc105ce09d6a9326bdaf (patch)
treeac492d10afa79226f4a419cc09751d177105e340 /Mk
parent178b0490c2df2674c6491d007e3b508bc939552d (diff)
downloadports-466a092fb2fb619f5348dc105ce09d6a9326bdaf.tar.gz
ports-466a092fb2fb619f5348dc105ce09d6a9326bdaf.zip
Move script to a more appropriate location.
Notes
Notes: svn path=/head/; revision=544070
Diffstat (limited to 'Mk')
-rwxr-xr-xMk/Scripts/sed_checked.sh13
-rw-r--r--Mk/bsd.port.mk2
2 files changed, 14 insertions, 1 deletions
diff --git a/Mk/Scripts/sed_checked.sh b/Mk/Scripts/sed_checked.sh
new file mode 100755
index 000000000000..9c8c270f6099
--- /dev/null
+++ b/Mk/Scripts/sed_checked.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+/usr/bin/sed -i.bak "$@"
+for x in "${@}" ; do
+ if [ -f "${x}" ]; then
+ if cmp -s "${x}" "${x}".bak ; then
+ if [ ! -z "${REWARNFILE}" ]; then
+ echo - - REINPLACE_CMD ran, but did not modify file contents: ${x#${WRKSRC}/} >> ${REWARNFILE}
+ fi
+ fi
+ fi
+done
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index c9c498996191..7581ea96e62e 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -2021,7 +2021,7 @@ MAKE_ENV+= LANG=${USE_LOCALE} LC_ALL=${USE_LOCALE}
# Macro for doing in-place file editing using regexps
REINPLACE_ARGS?= -i.bak
.if defined(DEVELOPER)
-REINPLACE_CMD?= ${SETENV} WRKSRC=${WRKSRC} REWARNFILE=${REWARNFILE} ${PORTSDIR}/Tools/scripts/sed_checked.sh
+REINPLACE_CMD?= ${SETENV} WRKSRC=${WRKSRC} REWARNFILE=${REWARNFILE} ${SCRIPTSDIR}/sed_checked.sh
.else
REINPLACE_CMD?= ${SED} ${REINPLACE_ARGS}
.endif