diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-09-17 09:07:34 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-09-17 09:11:53 +0200 |
commit | 3009bf38b7da4e92990c197f7d8e4d2d2b0bfec9 (patch) | |
tree | 4c3d19bb8fe050785260dde4d84f68ff9ca1175e /app-text | |
parent | app-text/docbook-xml-dtd: Restore .cat backup for non-empty too (diff) | |
download | gentoo-3009bf38b7da4e92990c197f7d8e4d2d2b0bfec9.tar.gz gentoo-3009bf38b7da4e92990c197f7d8e4d2d2b0bfec9.tar.bz2 gentoo-3009bf38b7da4e92990c197f7d8e4d2d2b0bfec9.zip |
app-text/docbook-xml-simple-dtd: Restore .cat backup for non-empty too
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-text')
3 files changed, 12 insertions, 6 deletions
diff --git a/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-1.0-r3.ebuild b/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-1.0-r3.ebuild index ca6929bbed33..19a3541028bd 100644 --- a/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-1.0-r3.ebuild +++ b/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-1.0-r3.ebuild @@ -36,8 +36,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/xml-simple-docbook-${PV}.cat ]]; then - cp "${T}"/xml-simple-docbook-${PV}.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/xml-simple-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-simple-docbook-${PV}.cat + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die fi build-docbook-catalog sgml-catalog-r1_pkg_postinst diff --git a/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.4-r4.ebuild b/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.4-r4.ebuild index d4e1735315d0..bd0a32a10e5e 100644 --- a/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.4-r4.ebuild +++ b/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.4-r4.ebuild @@ -39,8 +39,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/xml-simple-docbook-${PV}.cat ]]; then - cp "${T}"/xml-simple-docbook-${PV}.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/xml-simple-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-simple-docbook-${PV}.cat + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die fi build-docbook-catalog sgml-catalog-r1_pkg_postinst diff --git a/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.5-r3.ebuild b/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.5-r3.ebuild index b818a587508e..e68783e3d120 100644 --- a/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.5-r3.ebuild +++ b/app-text/docbook-xml-simple-dtd/docbook-xml-simple-dtd-4.1.2.5-r3.ebuild @@ -36,8 +36,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/xml-simple-docbook-${PV}.cat ]]; then - cp "${T}"/xml-simple-docbook-${PV}.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/xml-simple-docbook-${PV}.cat + local real=${EROOT}/etc/sgml/xml-simple-docbook-${PV}.cat + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die fi build-docbook-catalog sgml-catalog-r1_pkg_postinst |