summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-09-17 09:07:30 +0200
committerMichał Górny <mgorny@gentoo.org>2019-09-17 09:11:50 +0200
commit8e9b6ca0d9aea5c56f5ae89a741f87c281b30377 (patch)
tree60750155c21314d552e8ca1dbf4da533ecc9efbc /app-text/docbook-dsssl-stylesheets
parentsys-fs/wpflash: Set LICENSE to all-rights-reserved (diff)
downloadgentoo-8e9b6ca0d9aea5c56f5ae89a741f87c281b30377.tar.gz
gentoo-8e9b6ca0d9aea5c56f5ae89a741f87c281b30377.tar.bz2
gentoo-8e9b6ca0d9aea5c56f5ae89a741f87c281b30377.zip
app-text/docbook-dsssl-stylesheets: Restore .cat backup for non-empty too
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-text/docbook-dsssl-stylesheets')
-rw-r--r--app-text/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-1.79-r4.ebuild6
1 files changed, 4 insertions, 2 deletions
diff --git a/app-text/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-1.79-r4.ebuild b/app-text/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-1.79-r4.ebuild
index 8603dfc7f360..7137b03bc61c 100644
--- a/app-text/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-1.79-r4.ebuild
+++ b/app-text/docbook-dsssl-stylesheets/docbook-dsssl-stylesheets-1.79-r4.ebuild
@@ -64,8 +64,10 @@ pkg_preinst() {
}
pkg_postinst() {
- if [[ ! -f ${EROOT}/etc/sgml/dsssl-docbook-stylesheets.cat ]]; then
- cp "${T}"/dsssl-docbook-stylesheets.cat "${EROOT}"/etc/sgml/ || die
+ local backup=${T}/dsssl-docbook-stylesheets.cat
+ local real=${EROOT}/etc/sgml/dsssl-docbook-stylesheets.cat
+ if ! cmp -s "${backup}" "${real}"; then
+ cp "${backup}" "${real}" || die
fi
# this one's shared with openjade, so we need to do it in postinst
if ! grep -q -s dsssl-docbook-stylesheets.cat \