void-packages/triggers/mimedb
Juan RP 5b3489c9ea xbps-base-files: some changes to all triggers.
--HG--
extra : convert_revision : 2f3a39a7d1853268b84c5087cbbf5e74044c20f0
2009-05-19 02:13:58 +02:00

31 lines
498 B
Bash
Executable file

#!/bin/sh
#
# Updates the shared-mime-info db file with update-mime-database(1).
#
# Arguments: $1 = action [run/targets]
# $2 = target [post-install/post-remove]
# $3 = pkgname
# $4 = version
#
mimedb_bin=usr/bin/update-mime-database
case "$1" in
targets)
echo "post-install post-remove"
;;
run)
case "$2" in
post-*)
if [ -x ${mimedb_bin} ]; then
echo "Updating shared-mime-info database..."
${mimedb_bin} usr/share/mime > /dev/null
fi
;;
esac
;;
*)
exit 1
;;
esac
exit 0