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.
14 lines
313 B
Bash
Executable File
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
|