desktop-file-utils/desktop_mime_type.prov
Richard Hughes 88ab8498cf - Rename desktop-mime-type.prov to desktop_mime_type.prov and add the tiny
macros.desktop_mime_type file so that we can trivially patch rpm to
    enable this new functionality.
2009-01-22 17:45:36 +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