From: Michał Górny Date: Tue, 17 Sep 2019 07:07:39 +0000 (+0200) Subject: app-text/openjade: Restore .cat backup for non-empty too X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1ffd1b26731d512c0554282394d7f3e58d1fa6f7;p=gentoo.git app-text/openjade: Restore .cat backup for non-empty too Signed-off-by: Michał Górny --- diff --git a/app-text/openjade/openjade-1.3.2-r9.ebuild b/app-text/openjade/openjade-1.3.2-r9.ebuild index 2d63798c3d74..9aa17662d63f 100644 --- a/app-text/openjade/openjade-1.3.2-r9.ebuild +++ b/app-text/openjade/openjade-1.3.2-r9.ebuild @@ -124,8 +124,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/${P}.cat ]]; then - cp "${T}"/${P}.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/${P}.cat + local real=${EROOT}/etc/sgml/${P}.cat + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die fi # this one's shared with docbook-dsssl, so we need to do it in postinst if ! grep -q -s ${P}.cat \