summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-09-17 09:07:39 +0200
committerMichał Górny <mgorny@gentoo.org>2019-09-17 09:11:56 +0200
commit1ffd1b26731d512c0554282394d7f3e58d1fa6f7 (patch)
tree28ec312183fafa9d2d7aadee8295daa027c2a687 /app-text
parentapp-text/linuxdoc-tools: Restore .cat backup for non-empty too (diff)
downloadgentoo-1ffd1b26731d512c0554282394d7f3e58d1fa6f7.tar.gz
gentoo-1ffd1b26731d512c0554282394d7f3e58d1fa6f7.tar.bz2
gentoo-1ffd1b26731d512c0554282394d7f3e58d1fa6f7.zip
app-text/openjade: Restore .cat backup for non-empty too
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-text')
-rw-r--r--app-text/openjade/openjade-1.3.2-r9.ebuild6
1 files changed, 4 insertions, 2 deletions
diff --git a/app-text/openjade/openjade-1.3.2-r9.ebuild b/app-text/openjade/openjade-1.3.2-r9.ebuild
index 2d63798c3d74..9aa17662d63f 100644
--- a/app-text/openjade/openjade-1.3.2-r9.ebuild
+++ b/app-text/openjade/openjade-1.3.2-r9.ebuild
@@ -124,8 +124,10 @@ pkg_preinst() {
}
pkg_postinst() {
- if [[ ! -f ${EROOT}/etc/sgml/${P}.cat ]]; then
- cp "${T}"/${P}.cat "${EROOT}"/etc/sgml/ || die
+ local backup=${T}/${P}.cat
+ local real=${EROOT}/etc/sgml/${P}.cat
+ if ! cmp -s "${backup}" "${real}"; then
+ cp "${backup}" "${real}" || die
fi
# this one's shared with docbook-dsssl, so we need to do it in postinst
if ! grep -q -s ${P}.cat \