summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-09-17 09:07:31 +0200
committerMichał Górny <mgorny@gentoo.org>2019-09-17 09:11:51 +0200
commit299042fc29cbb1cb9dbbcea2c5518761fd3819cb (patch)
treef296f2ff170e904cfd7b6fdfcdc363d4fc7831cc /app-text/docbook-sgml-dtd
parentapp-text/docbook-dsssl-stylesheets: Restore .cat backup for non-empty too (diff)
downloadgentoo-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')
-rw-r--r--app-text/docbook-sgml-dtd/docbook-sgml-dtd-3.0-r4.ebuild6
-rw-r--r--app-text/docbook-sgml-dtd/docbook-sgml-dtd-3.1-r4.ebuild6
-rw-r--r--app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.0-r4.ebuild6
-rw-r--r--app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.1-r4.ebuild6
-rw-r--r--app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.2-r3.ebuild6
-rw-r--r--app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.3-r3.ebuild6
-rw-r--r--app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.4-r1.ebuild6
-rw-r--r--app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.5-r1.ebuild6
8 files changed, 32 insertions, 16 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
}
diff --git a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-3.1-r4.ebuild b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-3.1-r4.ebuild
index d72a82568092..1787a5d05c8a 100644
--- a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-3.1-r4.ebuild
+++ b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-3.1-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
}
diff --git a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.0-r4.ebuild b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.0-r4.ebuild
index d72a82568092..1787a5d05c8a 100644
--- a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.0-r4.ebuild
+++ b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.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
}
diff --git a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.1-r4.ebuild b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.1-r4.ebuild
index d72a82568092..1787a5d05c8a 100644
--- a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.1-r4.ebuild
+++ b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.1-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
}
diff --git a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.2-r3.ebuild b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.2-r3.ebuild
index 868d3429aece..118ee2068463 100644
--- a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.2-r3.ebuild
+++ b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.2-r3.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
}
diff --git a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.3-r3.ebuild b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.3-r3.ebuild
index 65e94280b8f3..bef0181183d9 100644
--- a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.3-r3.ebuild
+++ b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.3-r3.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
}
diff --git a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.4-r1.ebuild b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.4-r1.ebuild
index 8e65feba19dc..fd2c41e6679f 100644
--- a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.4-r1.ebuild
+++ b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.4-r1.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
}
diff --git a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.5-r1.ebuild b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.5-r1.ebuild
index f72a63fe7579..9e8d322d952d 100644
--- a/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.5-r1.ebuild
+++ b/app-text/docbook-sgml-dtd/docbook-sgml-dtd-4.5-r1.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
}