#!/bin/bash
# Installer Gi.Ve Engine — Linux
# Esegui con: bash install-givengine-linux.sh
# (oppure: chmod +x, poi ./install-givengine-linux.sh)

clear
cat <<'EOF'
═══════════════════════════════════════════════════════════
   Gi.Ve Engine — Installazione
   Il motore IA che accelera il tuo business.
═══════════════════════════════════════════════════════════

EOF

echo "Sto scaricando l'installer ufficiale da engine.givegroup.it..."
echo ""

set -e
curl -fsSL https://engine.givegroup.it/install.sh | bash
EXIT=$?
set +e

echo ""
if [ $EXIT -eq 0 ]; then
    echo "✓ Installazione completata."
    echo "  Trovi Gi.Ve Engine nel menu applicazioni e sul Desktop."
else
    echo "⚠ L'installazione si è interrotta (codice $EXIT)."
fi

echo ""
echo "Premi INVIO per chiudere..."
read
