app-text/sgml-common: Restore .cat backup for non-empty too

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2019-09-17 09:11:56 +02:00
parent 1ffd1b2673
commit d12ab136a6
@@ -62,7 +62,7 @@ pkg_preinst() {
pkg_postinst() {
# restore backed up files if necessary
for f in sgml-ent.cat sgml-docbook.cat; do
if [[ ! -s ${EROOT}/etc/sgml/${f} ]]; then
if ! cmp -s "${T}/${f}" "${EROOT}/etc/sgml/${f}"; then
cp "${T}/${f}" "${EROOT}"/etc/sgml/ || die
fi
done