From: Michał Górny Date: Tue, 17 Sep 2019 07:07:36 +0000 (+0200) Subject: app-text/html401: Restore .cat backup for non-empty too X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=73415678715ed16c911f4249b1f88c8293684562;p=gentoo.git app-text/html401: Restore .cat backup for non-empty too Signed-off-by: Michał Górny --- diff --git a/app-text/html401/html401-19991224-r4.ebuild b/app-text/html401/html401-19991224-r4.ebuild index 8f75a577ac4d..2456ff58ee72 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 }