Avoid noise from python bytecompile on non-python pkgs (RhBug:539635)
[platform/upstream/rpm.git] / scripts / desktop-file.prov
1 #!/bin/sh
2 #
3 # Transform desktop mimetype info into RPM mimehandler(type) provides
4 #
5 # Author: Richard Hughes <richard@hughsie.com>
6 # Based on other provides scripts from RPM
7
8 OLD_IFS="$IFS"
9 while read instfile ; do
10         case "$instfile" in
11         *.desktop)
12                 mime=`cat "$instfile" | grep MimeType= | cut -d'=' -f2`
13                 IFS=';'
14                 for type in $mime ; do
15                         echo 'mimehandler('$type')'
16                 done
17                 ;;
18         esac
19 done
20 IFS=$OLD_IFS
21