From 78588910507040df4606498c82d0b214de2ce0c3 Mon Sep 17 00:00:00 2001 From: Tim Date: Sat, 30 May 2026 15:54:09 +0200 Subject: [PATCH] setup.sh aktualisiert --- setup.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index f8b7bcd..941aca2 100644 --- a/setup.sh +++ b/setup.sh @@ -13,7 +13,8 @@ if [ -d "/data/data/com.termux/files/usr" ]; then elif [ -f /etc/os-release ]; then . /etc/os-release SPECIFIC_ID=$ID - BASE_ID=$ID_LIKE + # Falls ID_LIKE nicht gesetzt ist (z.B. direkt auf Fedora), nutzen wir die ID als Base + BASE_ID=${ID_LIKE:-$ID} BIN_PATH="/usr/bin" else SPECIFIC_ID="unknown" @@ -40,10 +41,13 @@ case "$SPECIFIC_ID" in $S apt-get update && $S apt-get install -y zsh curl git neovim fastfetch eza ;; *alpine*) $S apk add zsh curl git neovim fastfetch eza shadow ncurses-terminfo-base ;; + *fedora*|*alma*|*rocky*|*rhel*) + # dnf wird für Fedora/RHEL-Derivate genutzt + $S dnf check-update -y # Gibt oft Exit-Code 100 bei Updates zurück, daher kein '&&' zwingend + $S dnf install -y zsh curl git neovim fastfetch eza util-linux-user ;; esac # --- 4. Verzeichnisse erstellen (Termux-Safe) --- -# In Termux ist $HOME meist /data/data/com.termux/files/home mkdir -p "$HOME/.config/nvim" "$HOME/.config/fastfetch" # --- 5. .zshrc mit Fallback laden --- @@ -65,9 +69,7 @@ curl -fsSL "${GITEA_RAW}/.config/fastfetch/fastfetch.jsonc" -o "$HOME/.config/fa curl -fsSL "${GITEA_RAW}/.config/nvim/init.lua" -o "$HOME/.config/nvim/init.lua" # --- 7. Shell-Wechsel --- -# In Termux gibt es kein 'chsh' im klassischen Sinne oder es funktioniert anders if [ "$SPECIFIC_ID" = "termux" ]; then - # Setzt ZSH als Login-Shell für Termux chsh -s zsh >/dev/null 2>&1 else if [ "$SHELL" != "$(command -v zsh)" ]; then @@ -75,4 +77,4 @@ else fi fi -echo "🚀 Setup abgeschlossen! Starte ZSH neu..." +echo "🚀 Setup abgeschlossen! Starte ZSH neu..." \ No newline at end of file