desktop-file-utils/desktop-mime-type.prov
Richard Hughes 960a70c08c - Add desktop-mime-type.prov so that we can automatically generate mimetype
provides for packages at build time. This lets us do some cool things
    with PackageKit in the future.
2008-05-02 13:25:52 +00:00

27 lines
489 B
Bash

#!/bin/sh
#
# Script to install in:
# /usr/lib/rpm/redhat/find-provides.d
#
# Transform desktop mimetype info into RPM provides
#
# Author: Richard Hughes <richard@hughsie.com>
# Based on other provides scripts from RPM
#
#!/bin/sh
OLD_IFS="$IFS"
while read instfile ; do
case "$instfile" in
*.desktop)
mime=`cat $instfile | grep MimeType | cut -d'=' -f2`
IFS=';'
for type in $mime ; do
echo 'mimetype('$type')'
done
;;
esac
done
IFS=$OLD_IFS