Installing mimetypes with a package

From Salix OS
Jump to: navigation, search

When your package includes xml files in usr/share/mime, the system should be informed about the new mimetypes when the package is installed. That can be accomplished by entering the following code in your

#update the mime desktop database
if [ -x usr/bin/update-desktop-database ]; then
  usr/bin/update-desktop-database -q
# update the mime database
if [ -x usr/bin/update-mime-database ]; then
  usr/bin/update-mime-database usr/share/mime > /dev/null 2>&1