2009-04-17 00:38:06 +00:00
|
|
|
#!/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
|
|
|
|
#
|
2009-05-19 00:13:58 +00:00
|
|
|
mimedb_bin=usr/bin/update-mime-database
|
2009-04-17 00:38:06 +00:00
|
|
|
|
|
|
|
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..."
|
2009-05-19 00:13:58 +00:00
|
|
|
${mimedb_bin} usr/share/mime > /dev/null
|
2009-04-17 00:38:06 +00:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|