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
20 lines
436 B
Bash
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
|