diff options
author | Alexis Ballier <aballier@gentoo.org> | 2010-10-24 16:22:33 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2010-10-24 16:22:33 +0000 |
commit | 625d8f68e41fd9a6bd7d4e46fa2770ff3d86d5ed (patch) | |
tree | 90089f2735af4a77f7552cefb8959014a49dc382 /eclass/texlive-common.eclass | |
parent | Stable x86 wrt bug 341821. (diff) | |
download | historical-625d8f68e41fd9a6bd7d4e46fa2770ff3d86d5ed.tar.gz historical-625d8f68e41fd9a6bd7d4e46fa2770ff3d86d5ed.tar.bz2 historical-625d8f68e41fd9a6bd7d4e46fa2770ff3d86d5ed.zip |
Add etexmf-update to call texmf-update from ebuilds so that some duplicated code can be factorized
Diffstat (limited to 'eclass/texlive-common.eclass')
-rw-r--r-- | eclass/texlive-common.eclass | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/eclass/texlive-common.eclass b/eclass/texlive-common.eclass index 4ca90247d7a1..49dea8094960 100644 --- a/eclass/texlive-common.eclass +++ b/eclass/texlive-common.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-common.eclass,v 1.13 2010/10/24 04:35:59 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/texlive-common.eclass,v 1.14 2010/10/24 16:22:33 aballier Exp $ # @ECLASS: texlive-common.eclass # @MAINTAINER: @@ -126,3 +126,19 @@ dobin_texmf_scripts() { shift done } + +# @FUNCTION: etexmf-update +# @USAGE: In ebuilds' pkg_postinst and pkg_postrm phases +# @DESCRIPTION: +# Runs texmf-update if it is available and prints a warning otherwise. This +# function helps in factorizing some code. + +etexmf-update() { + if [ "$ROOT" = "/" ] && [ -x /usr/sbin/texmf-update ] ; then + /usr/sbin/texmf-update + else + ewarn "Cannot run texmf-update for some reason." + ewarn "Your texmf tree might be inconsistent with your configuration" + ewarn "Please try to figure what has happened" + fi +} |