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