diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-09-17 09:07:31 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-09-17 09:11:51 +0200 |
commit | 299042fc29cbb1cb9dbbcea2c5518761fd3819cb (patch) | |
tree | f296f2ff170e904cfd7b6fdfcdc363d4fc7831cc /app-text/docbook-sgml-dtd/docbook-sgml-dtd-3.0-r4.ebuild | |
parent | app-text/docbook-dsssl-stylesheets: Restore .cat backup for non-empty too (diff) | |
download | gentoo-299042fc29cbb1cb9dbbcea2c5518761fd3819cb.tar.gz gentoo-299042fc29cbb1cb9dbbcea2c5518761fd3819cb.tar.bz2 gentoo-299042fc29cbb1cb9dbbcea2c5518761fd3819cb.zip |
app-text/docbook-sgml-dtd: Restore .cat backup for non-empty too
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-text/docbook-sgml-dtd/docbook-sgml-dtd-3.0-r4.ebuild')
-rw-r--r-- | app-text/docbook-sgml-dtd/docbook-sgml-dtd-3.0-r4.ebuild | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-3.0-r4.ebuild b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-3.0-r4.ebuild index d72a82568092..1787a5d05c8a 100644 --- a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-3.0-r4.ebuild +++ b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-3.0-r4.ebuild @@ -37,8 +37,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/sgml-docbook-${PV}.cat ]]; then - cp "${T}"/sgml-docbook-${PV}.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/sgml-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/sgml-docbook-${PV}.cat + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die fi sgml-catalog-r1_pkg_postinst } |