diff --git a/install.sh b/install.sh index d39aa9d..f762e7f 100644 --- a/install.sh +++ b/install.sh @@ -8,17 +8,25 @@ echo "🚀 Starte Bootstrap Installation..." GIT_REPO="ssh://git@192.168.178.5:2222/kai/workstation-config.git" TARGET_DIR="$HOME/workstation-config" -# 📦 Repo klonen (oder aktualisieren) +# 🔍 Prüfen ob echtes Git-Repo if [ -d "$TARGET_DIR/.git" ]; then - echo "🔄 Repo existiert – update..." + echo "🔄 Gültiges Repo gefunden – update..." cd "$TARGET_DIR" git pull else - echo "📥 Klone Repo..." + echo "⚠️ Kein gültiges Repo gefunden" + + # Falls Ordner existiert → löschen (wichtig!) + if [ -d "$TARGET_DIR" ]; then + echo "🧹 Entferne alten Ordner..." + rm -rf "$TARGET_DIR" + fi + + echo "📥 Klone Repo neu..." git clone "$GIT_REPO" "$TARGET_DIR" fi cd "$TARGET_DIR/temp-cleanup" -echo "⚙️ Starte eigentliche Installation..." +echo "⚙️ Starte Installation..." bash install.sh \ No newline at end of file