HEX
Server: LiteSpeed
System: Linux c002.dapurhosting.com 3.10.0-962.3.2.lve1.5.83.el7.x86_64 #1 SMP Thu Nov 23 15:58:18 UTC 2023 x86_64
User: distri20 (2231)
PHP: 8.4.13
Disabled: NONE
Upload Files
File: //lib/rpm/desktop-file.prov
#!/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)
		if ! grep -q '^Type=Application$' "$instfile"; then continue; fi
		if ! grep -q '^Exec=' "$instfile"; then continue; fi
		echo "application()"
		echo "application(${instfile##*/applications/})"
		mime=`grep '^MimeType=' "$instfile" | cut -d'=' -f2`
		IFS=';'
		for type in $mime ; do
			echo 'mimehandler('$type')'
		done
		;;
	esac
done
IFS=$OLD_IFS