mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
423 B

  1. #!/bin/sh
  2. update_mime_db() {
  3. local dir
  4. for dir in $@ ; do
  5. if [ -d $dir -a -d $dir/packages ] ; then
  6. update-mime-db -V $dir
  7. fi
  8. done
  9. }
  10. [ -z "$XDG_DATA_DIRS" ] && XDG_DATA_DIRS="/usr/local/share:/usr/share"
  11. if [ "$install_checks_true" = 1 ] ; then
  12. update_mime_db ${XDG_DATA_DIRS//:/ } /opt/*/share/mime
  13. else
  14. update_mime_db $( all_installed ".*/share/mime/.*" | sed -e "s,\(/share/mime/\).*,\1," | sort -u )
  15. fi