Files
flatpak/triggers/mime-database.trigger
Simon McVittie bb307a5f26 triggers: Use command -v in preference to which
which(1) is not standardized by POSIX, and has different implementations
and behaviour on different distributions. The behaviour and exit status
of command -v is standardized by POSIX, and in particular, checking its
exit status is an appropriate way to ask: if I called this command,
would it be found?

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-01-25 10:07:03 +01:00

6 lines
164 B
Bash
Executable File

#!/bin/sh
if command -v update-mime-database >/dev/null && test -d "$1/exports/share/mime/packages"; then
exec update-mime-database "$1/exports/share/mime"
fi