install.sh aktualisiert
This commit is contained in:
+7
-12
@@ -4,21 +4,18 @@ set -e
|
|||||||
|
|
||||||
echo "🚀 Starte Bootstrap Installation..."
|
echo "🚀 Starte Bootstrap Installation..."
|
||||||
|
|
||||||
# 🧠 Konfiguration
|
|
||||||
GIT_REPO="ssh://git@192.168.178.5:2222/kai/workstation-config.git"
|
GIT_REPO="ssh://git@192.168.178.5:2222/kai/workstation-config.git"
|
||||||
TARGET_DIR="$HOME/workstation-config"
|
TARGET_DIR="$HOME/workstation-config"
|
||||||
|
|
||||||
# 🔍 Prüfen ob echtes Git-Repo
|
# 🧠 Prüfen ob es ein echtes Git Repo ist
|
||||||
if [ -d "$TARGET_DIR/.git" ]; then
|
if git -C "$TARGET_DIR" rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||||
echo "🔄 Gültiges Repo gefunden – update..."
|
echo "🔄 Gültiges Git-Repo gefunden – update..."
|
||||||
cd "$TARGET_DIR"
|
git -C "$TARGET_DIR" pull
|
||||||
git pull
|
|
||||||
else
|
else
|
||||||
echo "⚠️ Kein gültiges Repo gefunden"
|
echo "⚠️ Kein gültiges Git-Repo gefunden"
|
||||||
|
|
||||||
# Falls Ordner existiert → löschen (wichtig!)
|
|
||||||
if [ -d "$TARGET_DIR" ]; then
|
if [ -d "$TARGET_DIR" ]; then
|
||||||
echo "🧹 Entferne alten Ordner..."
|
echo "🧹 Entferne kaputten Ordner..."
|
||||||
rm -rf "$TARGET_DIR"
|
rm -rf "$TARGET_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -26,7 +23,5 @@ else
|
|||||||
git clone "$GIT_REPO" "$TARGET_DIR"
|
git clone "$GIT_REPO" "$TARGET_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "$TARGET_DIR/temp-cleanup"
|
|
||||||
|
|
||||||
echo "⚙️ Starte Installation..."
|
echo "⚙️ Starte Installation..."
|
||||||
bash install.sh
|
bash "$TARGET_DIR/temp-cleanup/install.sh"
|
||||||
Reference in New Issue
Block a user