From 1ffd1b26731d512c0554282394d7f3e58d1fa6f7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 17 Sep 2019 09:07:39 +0200 Subject: [PATCH] app-text/openjade: Restore .cat backup for non-empty too MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- app-text/openjade/openjade-1.3.2-r9.ebuild | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 \ -- 2.26.2