aboutsummaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2020-01-09 13:01:45 +0000
committerSteve Wills <swills@FreeBSD.org>2020-01-09 13:01:45 +0000
commit0a82a7c0912bee406fa559989e271d190b571a7e (patch)
treef2e0cc169c8208e65c568edfc5e5db6ae44e1d2d /Tools
parent48f2ea9373455efc779f0e8e37ef118b75d548e5 (diff)
downloadports-0a82a7c0912bee406fa559989e271d190b571a7e.tar.gz
ports-0a82a7c0912bee406fa559989e271d190b571a7e.zip
Add QA warning about useless REINPLACE_CMD
Reviewed by: mat, bdrewery, tobik Approved by: mat Differential Revision: https://reviews.freebsd.org/D22174
Notes
Notes: svn path=/head/; revision=522484
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/scripts/sed_checked.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tools/scripts/sed_checked.sh b/Tools/scripts/sed_checked.sh
new file mode 100755
index 000000000000..1592062c4bf3
--- /dev/null
+++ b/Tools/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 sed failed: backup file same as original: ${x#${WRKSRC}/} >> ${REWARNFILE}
+ fi
+ fi
+ fi
+done