#!/bin/bash
set -e
echo "Raid Browser 3.0 installato!"
echo "Avvia con: raid-browser"
echo "Oppure dal menu Applicazioni > Internet > Raid Browser"

# Installa dipendenze Python
if command -v pip3 &> /dev/null; then
    pip3 install -q -r /usr/share/raid-browser/requirements.txt 2>/dev/null || true
fi

# Aggiorna database icone
if command -v gtk-update-icon-cache &> /dev/null; then
    gtk-update-icon-cache -f -t /usr/share/icons/hicolor 2>/dev/null || true
fi

# Aggiorna database desktop
if command -v update-desktop-database &> /dev/null; then
    update-desktop-database 2>/dev/null || true
fi
