ports/Tools/scripts/sed_checked.sh
Matthias Andree 1240f9c8de Tools/scripts/sed_checked.sh: reword sed warning
The original wording was misleading and might have mistaken for
identical file names, but what is meant is that the sed run did not
introduce changes to the file's __content__. Reword accordingly.
2020-01-12 12:06:52 +00:00

14 lines
313 B
Bash
Executable File

#!/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: file content unchanged from backup: ${x#${WRKSRC}/} >> ${REWARNFILE}
fi
fi
fi
done