diff options
author | Steve Wills <swills@FreeBSD.org> | 2020-01-09 13:01:45 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2020-01-09 13:01:45 +0000 |
commit | 0a82a7c0912bee406fa559989e271d190b571a7e (patch) | |
tree | f2e0cc169c8208e65c568edfc5e5db6ae44e1d2d /Tools | |
parent | 48f2ea9373455efc779f0e8e37ef118b75d548e5 (diff) |
Notes
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/sed_checked.sh | 13 |
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 |