#!/bin/sh -e
fiv=${DESTDIR:+$DESTDIR/}'@FIV@'
desktopdir=${DESTDIR:+$DESTDIR/}'@DESKTOPDIR@'
types=$("$fiv" --list-supported-media-types | tr '\n' ';')
for desktop in @DESKTOPS@
do sed -i "s|^MimeType=.*|MimeType=$types|" "$desktopdir"/"$desktop"
done