From 07fe566315d6c84e57a0c0d4cba7c70eef691648 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 17 Sep 2019 09:07:38 +0200 Subject: [PATCH] app-text/linuxdoc-tools: 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/linuxdoc-tools/linuxdoc-tools-0.9.73-r1.ebuild | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app-text/linuxdoc-tools/linuxdoc-tools-0.9.73-r1.ebuild b/app-text/linuxdoc-tools/linuxdoc-tools-0.9.73-r1.ebuild index 4f2129a2644a..0639b6ae8b3d 100644 --- a/app-text/linuxdoc-tools/linuxdoc-tools-0.9.73-r1.ebuild +++ b/app-text/linuxdoc-tools/linuxdoc-tools-0.9.73-r1.ebuild @@ -72,8 +72,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/linuxdoc.cat ]]; then - cp "${T}"/linuxdoc.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/linuxdoc.cat + local real=${EROOT}/etc/sgml/linuxdoc.cat + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die fi latex-package_pkg_postinst -- 2.26.2