fiv/fiv-update-desktop-files.in
Přemysl Eric Janouch 796b05c9a5
Integrate online reverse image search
This makes use of our image processing capabilities in order to
turn arbitrary image files into normalized thumbnails,
upload them to a temporary host, and pass the resulting URI
to a search provider.

In future, fiv should ideally run the upload itself,
so that its status and any errors are obvious to the user,
as well as to get rid of the script's dependency on jq.
2023-03-15 05:52:32 +01:00

9 lines
253 B
Bash
Executable File

#!/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