I am building an applications that will update the mime folder. It will screw up the mime type for my desktop after i install it. It can be solve by running
update-mime-database /usr/share/mime
.
I can modify the slackbuild to include below command inside the doinst.sh
if [ -x usr/bin/update-desktop-database -a -x usr/bin/chroot ]; then
usr/bin/chroot /$ROOT /usr/bin/update-desktop-database &> /dev/null
fi
if [ -x usr/bin/update-mime-database -a -x usr/bin/chroot ]; then
usr/bin/chroot /$ROOT /usr/bin/update-mime-database /usr/share/mime &> /dev/null
fi
but what if I uninstall the app and re-run the command again?