From 73415678715ed16c911f4249b1f88c8293684562 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 17 Sep 2019 09:07:36 +0200 Subject: [PATCH] app-text/html401: 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/html401/html401-19991224-r4.ebuild | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 } -- 2.26.2