diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-09-17 09:07:33 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-09-17 09:11:52 +0200 |
commit | c2dcf16a1ca58a9e7b9b932aaccd43454dcfeb21 (patch) | |
tree | 178cb688f0f8a013c194551db3734987ee034d3e /app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild | |
parent | app-text/docbook-sgml-dtd: Restore .cat backup for non-empty too (diff) | |
download | gentoo-c2dcf16a1ca58a9e7b9b932aaccd43454dcfeb21.tar.gz gentoo-c2dcf16a1ca58a9e7b9b932aaccd43454dcfeb21.tar.bz2 gentoo-c2dcf16a1ca58a9e7b9b932aaccd43454dcfeb21.zip |
app-text/docbook-xml-dtd: Restore .cat backup for non-empty too
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild')
-rw-r--r-- | app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild index db788fca68f3..2864178f068a 100644 --- a/app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild +++ b/app-text/docbook-xml-dtd/docbook-xml-dtd-4.3-r2.ebuild @@ -49,8 +49,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/xml-docbook-${PV}.cat ]]; then - cp "${T}"/xml-docbook-${PV}.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/xml-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-docbook-${PV}.cat + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die fi build-docbook-catalog sgml-catalog-r1_pkg_postinst |