vp-build/triggers/mimedb
Juan RP 557b1e8982 xbps-base-files: add a trigger for shared-mime-info, remove unneeded helper.
--HG--
extra : convert_revision : 82b94bbe3c158b08a597fb09eebc8a63c404a43d
2009-04-17 02:38:06 +02:00

35 lines
556 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
#
trigger="mimedb"
mimedb_bin=./usr/bin/update-mime-database
case "$1" in
targets)
echo "post-install post-remove"
;;
run)
echo "Running $trigger trigger..."
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