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