#!/usr/bin/env bash set -e echo "🚀 Starte Bootstrap Installation..." GIT_REPO="ssh://git@192.168.178.5:2222/kai/workstation-config.git" TARGET_DIR="$HOME/workstation-config" # 🧠 Prüfen ob es ein echtes Git Repo ist if git -C "$TARGET_DIR" rev-parse --is-inside-work-tree >/dev/null 2>&1; then echo "🔄 Gültiges Git-Repo gefunden – update..." git -C "$TARGET_DIR" pull else echo "⚠️ Kein gültiges Git-Repo gefunden" if [ -d "$TARGET_DIR" ]; then echo "🧹 Entferne kaputten Ordner..." rm -rf "$TARGET_DIR" fi echo "📥 Klone Repo neu..." git clone "$GIT_REPO" "$TARGET_DIR" fi echo "⚙️ Starte Installation..." bash "$TARGET_DIR/temp-cleanup/install.sh"