From: Michał Górny Date: Tue, 17 Sep 2019 07:07:42 +0000 (+0200) Subject: app-text/sgmltools-lite: Restore .cat backup for non-empty too X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2da95873dbe9c2023711aea244def786e8c9fe6f;p=gentoo.git app-text/sgmltools-lite: Restore .cat backup for non-empty too Signed-off-by: Michał Górny --- diff --git a/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r15.ebuild b/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r15.ebuild index b8d8da45abc7..b23d92b022ee 100644 --- a/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r15.ebuild +++ b/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r15.ebuild @@ -92,8 +92,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/sgml-lite.cat ]]; then - cp "${T}"/sgml-lite.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/sgml-lite.cat + local real=${EROOT}/etc/sgml/sgml-lite.cat + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die fi sgml-catalog-r1_pkg_postinst }