teknoraver / rpms / rpm

Forked from rpms/rpm 4 months ago
Clone

Blame desktop-file.prov

Panu Matilainen c66608
#!/bin/sh
Panu Matilainen c66608
#
Panu Matilainen c66608
# Transform desktop mimetype info into RPM mimehandler(type) provides
Panu Matilainen c66608
#
Panu Matilainen c66608
# Author: Richard Hughes <richard@hughsie.com>
Panu Matilainen c66608
# Based on other provides scripts from RPM
Panu Matilainen c66608
Panu Matilainen c66608
OLD_IFS="$IFS"
Panu Matilainen c66608
while read instfile ; do
Panu Matilainen c66608
	case "$instfile" in
Panu Matilainen c66608
	*.desktop)
Panu Matilainen c66608
		mime=`cat $instfile | grep MimeType= | cut -d'=' -f2`
Panu Matilainen c66608
                IFS=';'
Panu Matilainen c66608
		for type in $mime ; do
Panu Matilainen c66608
		        echo 'mimehandler('$type')'
Panu Matilainen c66608
	        done
Panu Matilainen c66608
		;;
Panu Matilainen c66608
	esac
Panu Matilainen c66608
done
Panu Matilainen c66608
IFS=$OLD_IFS
Panu Matilainen c66608