/[gentoo-x86]/eclass/fdo-mime.eclass
Gentoo

Contents of /eclass/fdo-mime.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Tue Aug 9 18:50:43 2011 UTC (3 years, 1 month ago) by darkside
Branch: MAIN
Changes since 1.11: +3 -1 lines
also protect EROOT that I overlooked in previous commit

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/fdo-mime.eclass,v 1.11 2011/08/09 18:43:05 darkside Exp $
4
5 # @ECLASS: fdo-mime.eclass
6 # @MAINTAINER: freedesktop-bugs@gentoo.org
7 #
8 #
9 # Original author: foser <foser@gentoo.org>
10 # @BLURB: Utility eclass to update the desktop mime info as laid out in the freedesktop specs & implementations
11
12
13 # @FUNCTION: fdo-mime_desktop_database_update
14 # @DESCRIPTION:
15 # Updates the desktop database.
16 # Generates a list of mimetypes linked to applications that can handle them
17 fdo-mime_desktop_database_update() {
18 has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
19 has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
20 if [ -x "${EPREFIX}/usr/bin/update-desktop-database" ]
21 then
22 einfo "Updating desktop mime database ..."
23 "${EPREFIX}/usr/bin/update-desktop-database" -q "${EROOT}/usr/share/applications"
24 fi
25 }
26
27 # @FUNCTION: fdo-mime_mime_database_update
28 # @DESCRIPTION:
29 # Update the mime database.
30 # Creates a general list of mime types from several sources
31 fdo-mime_mime_database_update() {
32 has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX=
33 has "${EAPI:-0}" 0 1 2 && ! use prefix && EROOT="${ROOT}"
34 if [ -x "${EPREFIX}/usr/bin/update-mime-database" ]
35 then
36 einfo "Updating shared mime info database ..."
37 "${EPREFIX}/usr/bin/update-mime-database" "${EROOT%/}/usr/share/mime"
38 fi
39 }

  ViewVC Help
Powered by ViewVC 1.1.20