postinstall.sh 825 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. # Update desktop database for .desktop file changes
  3. # This makes the application appear in application menus and registers its capabilities.
  4. if command -v update-desktop-database >/dev/null 2>&1; then
  5. echo "Updating desktop database..."
  6. update-desktop-database -q /usr/share/applications
  7. else
  8. echo "Warning: update-desktop-database command not found. Desktop file may not be immediately recognized." >&2
  9. fi
  10. # Update MIME database for custom URL schemes (x-scheme-handler)
  11. # This ensures the system knows how to handle your custom protocols.
  12. if command -v update-mime-database >/dev/null 2>&1; then
  13. echo "Updating MIME database..."
  14. update-mime-database -n /usr/share/mime
  15. else
  16. echo "Warning: update-mime-database command not found. Custom URL schemes may not be immediately recognized." >&2
  17. fi
  18. exit 0