add MimeType= script



I've attached a quick shell script which people using the latest
development release may find useful.

It checks for .desktop files missing a MimeType= field, then if a
corresponding .applications file can be found that contains a
mime_types= it adds those mime types to the .desktop file, then updates
the desktop file database.

default prefix is /usr/share, which can be changed by passing the path
as an argument to the script.

It is probably very messy as I do very little shell scripting. For those
wondering about the [, ] to sed, the bluefish.applications file has
multiple entries so one appeared on a new line, whether this is the
correct thing to do or not I'm not entirely sure.


David

-- 
Make your website SCREEM - Site Creating & Editing EnvironMent

URL:  http://www.screem.org/
Mail: david screem org

Attachment: add-mime-types.sh
Description: application/shellscript

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]