#!/bin/bash echo "🔐 Einfaches GPG Setup für lxtools_installer" echo "===========================================" # Check if GPG is installed if ! command -v gpg &> /dev/null; then echo "❌ GPG ist nicht installiert" echo "Installation: sudo apt install gnupg" exit 1 fi # Check if GPG key exists if ! gpg --list-secret-keys | grep -q "sec"; then echo "📋 Erstelle GPG-Schlüssel automatisch..." echo "" echo "Verwende diese Einstellungen:" echo "- Name: Désiré Werner Menrath" echo "- Email: polunga40@unity-mail.de" echo "- Typ: RSA 4096" echo "- Gültigkeitsdauer: 2 Jahre" echo "" # Create GPG key non-interactively cat > /tmp/gpg_batch < public_key.asc echo "✅ Öffentlicher Schlüssel exportiert: public_key.asc" # Test the signing echo "" echo "🧪 Teste Signierung..." echo "test" > /tmp/test.txt if gpg --armor --detach-sign --yes /tmp/test.txt 2>/dev/null; then echo "✅ Signierung funktioniert!" rm /tmp/test.txt /tmp/test.txt.asc else echo "❌ Signierung fehlgeschlagen" fi echo "" echo "📋 Setup abgeschlossen!" echo "Jetzt kannst du ./build_compatible.sh ausführen"