rpm/desktop-file.prov
Panu Matilainen c66608cfaa - extract mimehandler provides from .desktop files
- preliminaries for extracting font provides (not enabled yet)
- dont classify font metrics data as fonts
- only run script dep extraction once per file, duh
2009-02-04 14:50:56 +00:00

22 lines
435 B
Bash
Executable File

#!/bin/sh
#
# Transform desktop mimetype info into RPM mimehandler(type) provides
#
# Author: Richard Hughes <richard@hughsie.com>
# Based on other provides scripts from RPM
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 'mimehandler('$type')'
done
;;
esac
done
IFS=$OLD_IFS