From: Michał Górny Date: Tue, 17 Sep 2019 07:07:38 +0000 (+0200) Subject: app-text/linuxdoc-tools: Restore .cat backup for non-empty too X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=07fe566315d6c84e57a0c0d4cba7c70eef691648;p=gentoo.git app-text/linuxdoc-tools: Restore .cat backup for non-empty too Signed-off-by: Michał Górny --- 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