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

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

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

 app-text/html401/html401-19991224-r4.ebuild | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/app-text/html401/html401-19991224-r4.ebuild 
b/app-text/html401/html401-19991224-r4.ebuild
index 8f75a577ac4..2456ff58ee7 100644
--- a/app-text/html401/html401-19991224-r4.ebuild
+++ b/app-text/html401/html401-19991224-r4.ebuild
@@ -36,8 +36,10 @@ pkg_preinst() {
 }
 
 pkg_postinst() {
-       if [[ ! -f ${EROOT}/etc/sgml/html401.cat ]]; then
-               cp "${T}"/html401.cat "${EROOT}"/etc/sgml/ || die
+       local backup=${T}/html401.cat
+       local real=${EROOT}/etc/sgml/html401.cat
+       if ! cmp -s "${backup}" "${real}"; then
+               cp "${backup}" "${real}" || die
        fi
        sgml-catalog-r1_pkg_postinst
 }

Reply via email to