nala failsafe hinzugefügt
This commit is contained in:
parent
b9882cfe23
commit
cfa51e01ee
23
install.sh
23
install.sh
|
@ -33,6 +33,22 @@ run() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
apt_safe_upgrade() {
|
||||||
|
log "🔁 Führe sicheres System-Upgrade durch..."
|
||||||
|
|
||||||
|
if [ "$DEBUG" = true ]; then
|
||||||
|
sudo DEBIAN_FRONTEND=noninteractive nala upgrade -y
|
||||||
|
else
|
||||||
|
sudo DEBIAN_FRONTEND=noninteractive nala upgrade -y >> "$LOGFILE" 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
log "✅ System-Upgrade erfolgreich abgeschlossen."
|
||||||
|
else
|
||||||
|
log "❌ Fehler beim System-Upgrade. Details siehe $LOGFILE"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
log "📦 Installiere Pakete..."
|
log "📦 Installiere Pakete..."
|
||||||
log "📦 Versuche nala zu installieren..."
|
log "📦 Versuche nala zu installieren..."
|
||||||
|
@ -48,16 +64,15 @@ if ! sudo apt install -y nala; then
|
||||||
|
|
||||||
# Erneuter Installationsversuch
|
# Erneuter Installationsversuch
|
||||||
if ! sudo apt install -y nala; then
|
if ! sudo apt install -y nala; then
|
||||||
log "❌ nala konnte auch nach Hinzufügen der Quelle nicht installiert werden."
|
log "❌ nala konnte auch nach Hinzufügen der Quelle nicht installiert werden. Updates müssen später manuell 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
|
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
|
else
|
||||||
run sudo nala upgrade -y
|
apt_safe_upgrade()
|
||||||
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
|
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
|
fi
|
||||||
else
|
else
|
||||||
log "✅ nala erfolgreich installiert."
|
log "✅ nala erfolgreich installiert."
|
||||||
run sudo nala upgrade -y
|
apt_safe_upgrade()
|
||||||
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
|
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
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue