| 1 | # Copyright 1999-2004 Gentoo Foundation |
1 | # Copyright 1999-2004 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/fdo-mime.eclass,v 1.5 2006/06/20 12:18:27 foser Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/fdo-mime.eclass,v 1.6 2008/02/10 14:47:14 eva Exp $ |
| 4 | |
4 | |
| 5 | # Author: |
5 | # Author: |
| 6 | # foser <foser@gentoo.org> |
6 | # foser <foser@gentoo.org> |
| 7 | |
7 | |
| 8 | # utility eclass to update the desktop mime info as laid out in the freedesktop specs & implementations |
8 | # utility eclass to update the desktop mime info as laid out in the freedesktop specs & implementations |
| … | |
… | |
| 12 | # Updates the desktop database |
12 | # Updates the desktop database |
| 13 | # Generates a list of mimetypes linked to applications that can handle them |
13 | # Generates a list of mimetypes linked to applications that can handle them |
| 14 | |
14 | |
| 15 | fdo-mime_desktop_database_update() { |
15 | fdo-mime_desktop_database_update() { |
| 16 | |
16 | |
| 17 | if [ -x ${ROOT}/usr/bin/update-desktop-database ] |
17 | if [ -x "${ROOT}/usr/bin/update-desktop-database" ] |
| 18 | then |
18 | then |
| 19 | einfo "Updating desktop mime database ..." |
19 | einfo "Updating desktop mime database ..." |
| 20 | ${ROOT}/usr/bin/update-desktop-database -q ${ROOT}/usr/share/applications |
20 | "${ROOT}/usr/bin/update-desktop-database" -q "${ROOT}/usr/share/applications" |
| 21 | fi |
21 | fi |
| 22 | |
22 | |
| 23 | } |
23 | } |
| 24 | |
24 | |
| 25 | # Update the mime database |
25 | # Update the mime database |
| 26 | # Creates a general list of mime types from several sources |
26 | # Creates a general list of mime types from several sources |
| 27 | |
27 | |
| 28 | fdo-mime_mime_database_update() { |
28 | fdo-mime_mime_database_update() { |
| 29 | |
29 | |
| 30 | if [ -x ${ROOT}/usr/bin/update-mime-database ] |
30 | if [ -x "${ROOT}/usr/bin/update-mime-database" ] |
| 31 | then |
31 | then |
| 32 | einfo "Updating shared mime info database ..." |
32 | einfo "Updating shared mime info database ..." |
| 33 | ${ROOT}/usr/bin/update-mime-database ${ROOT}/usr/share/mime |
33 | "${ROOT}/usr/bin/update-mime-database" "${ROOT}/usr/share/mime" |
| 34 | fi |
34 | fi |
| 35 | |
35 | |
| 36 | } |
36 | } |