update-desktop-files/mimetypes.prov
OBS User autobuild 06699249d2 Accepting request 37478 from X11:common:Factory
Copy from X11:common:Factory/update-desktop-files based on submit request 37478 from user vuntz

OBS-URL: https://build.opensuse.org/request/show/37478
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/update-desktop-files?expand=0&rev=64
2010-04-13 20:22:09 +00:00

20 lines
436 B
Bash

#!/bin/sh
# vim: sw=4 et
# Transform desktop mimetype info into RPM provides
OLD_IFS="$IFS"
while read instfile ; do
case "$instfile" in
*.desktop)
if grep '^Type *= *Application' "$instfile" >/dev/null 2>&1 ; then
mime=$(sed -re '/^MimeType *= *([a-zA-Z0-9. _/;-]*)/!d' $instfile | cut -d'=' -f2)
IFS=';'
for type in $mime ; do
echo 'mimehandler('$type')'
done
fi
;;
esac
done
IFS=$OLD_IFS