commit:     d12ab136a66fcbbd2ae00751f4980dc348d51ed7
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 17 07:07:41 2019 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Sep 17 07:11:56 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d12ab136

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

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 app-text/sgml-common/sgml-common-0.6.3-r7.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app-text/sgml-common/sgml-common-0.6.3-r7.ebuild 
b/app-text/sgml-common/sgml-common-0.6.3-r7.ebuild
index a9d675c8206..18b9bdd5b86 100644
--- a/app-text/sgml-common/sgml-common-0.6.3-r7.ebuild
+++ b/app-text/sgml-common/sgml-common-0.6.3-r7.ebuild
@@ -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

Reply via email to