Make check-files compatible with busybox diff

If busybox diff is used then script doesn't generate output when
rpmbuild is checking for installed (but unpackaged) file(s). This is
because busybox diff use unified format: '-' instead '< '.
This commit is contained in:
elros34 2019-10-29 15:57:33 +01:00 committed by Panu Matilainen
parent 4ddab4fb7e
commit af06db1d55
1 changed files with 1 additions and 1 deletions

View File

@ -28,5 +28,5 @@ trap "rm -f \"${FILES_DISK}\"" 0 2 3 5 10 13 15
# Find non-directory files in the build root and compare to the manifest.
# TODO: regex chars in last sed(1) expression should be escaped
find "${RPM_BUILD_ROOT}" -type f -o -type l | LC_ALL=C sort > "${FILES_DISK}"
LC_ALL=C sort | diff -d "${FILES_DISK}" - | sed -n 's|^< '"${RPM_BUILD_ROOT}"'\(.*\)$| \1|gp'
LC_ALL=C sort | diff -d "${FILES_DISK}" - | sed -n 's!^\(-\|< \)'"${RPM_BUILD_ROOT}"'\(.*\)$! \2!gp'