diff --git a/install.sh b/install.sh index 56507ad..004bd36 100644 --- a/install.sh +++ b/install.sh @@ -35,12 +35,32 @@ run() { # ------------------------------------------------------------------------------ log "📦 Installiere Pakete..." -echo "deb [arch=amd64,arm64,armhf] https://deb.volian.org/volian/ scar main" | sudo tee /etc/apt/sources.list.d/volian-archive-scar-unstable.list - wget -qO - https://deb.volian.org/volian/scar.key | sudo tee /etc/apt/trusted.gpg.d/volian-archive-scar-unstable.gpg > /dev/null -run sudo apt update -run sudo apt install nala -y -run sudo nala upgrade -y -run sudo nala install alacritty ninja-build gettext libtool-bin cmake g++ pkg-config unzip curl git tmux build-essential manpages-dev clangd python3-jedi zsh -y +log "📦 Versuche nala zu installieren..." + +if ! sudo apt install -y nala; then + log "⚠️ nala konnte nicht direkt installiert werden. Versuche Quelle hinzuzufügen..." + + # Paketquelle für nala hinzufügen + echo "deb [trusted=yes] http://deb.volian.org/volian/ scar main" | sudo tee /etc/apt/sources.list.d/volian-archive-scar.list > /dev/null + wget -qO - https://deb.volian.org/volian/scar.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/volian-archive-scar.gpg + + sudo apt update + + # Erneuter Installationsversuch + if ! sudo apt install -y nala; then + log "❌ nala konnte auch nach Hinzufügen der Quelle nicht installiert werden." + run sudo apt upgrade -y + run sudo apt install alacritty ninja-build gettext libtool-bin cmake g++ pkg-config unzip curl git tmux build-essential manpages-dev clangd python3-jedi zsh -y + else + run sudo nala upgrade -y + run sudo nala install alacritty ninja-build gettext libtool-bin cmake g++ pkg-config unzip curl git tmux build-essential manpages-dev clangd python3-jedi zsh -y + fi +else + log "✅ nala erfolgreich installiert." + run sudo nala upgrade -y + run sudo nala install alacritty ninja-build gettext libtool-bin cmake g++ pkg-config unzip curl git tmux build-essential manpages-dev clangd python3-jedi zsh -y +fi + pause_if_debug clear