desktop-file-utils/desktop-file.prov
Petr Šabata 3db7c9fc08 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/desktop-file-utils#24c3746a9eec7b976562377aa792243e3dc9afe1
2020-10-14 23:33:25 +02: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