1 |
commit: 1ffd1b26731d512c0554282394d7f3e58d1fa6f7 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 17 07:07:39 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 17 07:11:56 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ffd1b26 |
7 |
|
8 |
app-text/openjade: Restore .cat backup for non-empty too |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
app-text/openjade/openjade-1.3.2-r9.ebuild | 6 ++++-- |
13 |
1 file changed, 4 insertions(+), 2 deletions(-) |
14 |
|
15 |
diff --git a/app-text/openjade/openjade-1.3.2-r9.ebuild b/app-text/openjade/openjade-1.3.2-r9.ebuild |
16 |
index 2d63798c3d7..9aa17662d63 100644 |
17 |
--- a/app-text/openjade/openjade-1.3.2-r9.ebuild |
18 |
+++ b/app-text/openjade/openjade-1.3.2-r9.ebuild |
19 |
@@ -124,8 +124,10 @@ pkg_preinst() { |
20 |
} |
21 |
|
22 |
pkg_postinst() { |
23 |
- if [[ ! -f ${EROOT}/etc/sgml/${P}.cat ]]; then |
24 |
- cp "${T}"/${P}.cat "${EROOT}"/etc/sgml/ || die |
25 |
+ local backup=${T}/${P}.cat |
26 |
+ local real=${EROOT}/etc/sgml/${P}.cat |
27 |
+ if ! cmp -s "${backup}" "${real}"; then |
28 |
+ cp "${backup}" "${real}" || die |
29 |
fi |
30 |
# this one's shared with docbook-dsssl, so we need to do it in postinst |
31 |
if ! grep -q -s ${P}.cat \ |