diff options
author | Michał Górny <mgorny@gentoo.org> | 2019-09-17 09:07:42 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2019-09-17 09:11:57 +0200 |
commit | 2da95873dbe9c2023711aea244def786e8c9fe6f (patch) | |
tree | 6afeefe1267cea8ce1e96b9760b279a91752eb71 /app-text/sgmltools-lite | |
parent | app-text/sgml-common: Restore .cat backup for non-empty too (diff) | |
download | gentoo-2da95873dbe9c2023711aea244def786e8c9fe6f.tar.gz gentoo-2da95873dbe9c2023711aea244def786e8c9fe6f.tar.bz2 gentoo-2da95873dbe9c2023711aea244def786e8c9fe6f.zip |
app-text/sgmltools-lite: Restore .cat backup for non-empty too
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'app-text/sgmltools-lite')
-rw-r--r-- | app-text/sgmltools-lite/sgmltools-lite-3.0.3-r15.ebuild | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r15.ebuild b/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r15.ebuild index b8d8da45abc7..b23d92b022ee 100644 --- a/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r15.ebuild +++ b/app-text/sgmltools-lite/sgmltools-lite-3.0.3-r15.ebuild @@ -92,8 +92,10 @@ pkg_preinst() { } pkg_postinst() { - if [[ ! -f ${EROOT}/etc/sgml/sgml-lite.cat ]]; then - cp "${T}"/sgml-lite.cat "${EROOT}"/etc/sgml/ || die + local backup=${T}/sgml-lite.cat + local real=${EROOT}/etc/sgml/sgml-lite.cat + if ! cmp -s "${backup}" "${real}"; then + cp "${backup}" "${real}" || die fi sgml-catalog-r1_pkg_postinst } |