-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup-imperativ.sh
More file actions
executable file
·59 lines (53 loc) · 2.38 KB
/
Copy pathsetup-imperativ.sh
File metadata and controls
executable file
·59 lines (53 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env bash
# HAUPTWEG (Plan D): apt + rustup, alles vom System. rustup laeuft mit
# --no-modify-path, fasst also KEINE Shell-Configs an (Nix-Home-Manager-
# sicher). Die Nix-Dev-Shell (flake.nix) ist deprecated: Nix-rustc +
# System-GTK/glibc = ABI-Konflikt (stack smashing / Loader-Fehler).
# KAiOSSChat — Einmal-Setup (Phase 0): installiert alle Abhängigkeiten.
# Idempotent: bereits Installiertes wird erkannt und übersprungen.
set -euo pipefail
echo "=== KAiOSSChat Setup (Phase 0: Companion-Shell) ==="
# 1. Tauri-Systemabhängigkeiten (Ubuntu/Debian)
echo "--- [1/4] System-Pakete (webkit2gtk & Co.) ---"
NEED=()
for pkg in libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev \
libayatana-appindicator3-dev librsvg2-dev libgtk-3-dev pkg-config; do
dpkg -s "$pkg" >/dev/null 2>&1 || NEED+=("$pkg")
done
if [ ${#NEED[@]} -gt 0 ]; then
echo "Installiere: ${NEED[*]} (sudo erforderlich)"
sudo apt-get update -qq && sudo apt-get install -y "${NEED[@]}"
else
echo "✅ System-Pakete vorhanden."
fi
# 2. Rust-Toolchain
echo "--- [2/4] Rust ---"
if ! command -v cargo >/dev/null 2>&1; then
echo "Installiere rustup (stable, --no-modify-path: keine Shell-Configs)…"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path
# shellcheck disable=SC1091
source "$HOME/.cargo/env"
else
echo "✅ Rust vorhanden: $(rustc --version)"
fi
# 3. Tauri-CLI (v2)
echo "--- [3/4] Tauri-CLI ---"
if ! cargo tauri --version >/dev/null 2>&1; then
echo "Installiere tauri-cli (dauert ein paar Minuten)…"
cargo install tauri-cli --version '^2' --locked
else
echo "✅ Tauri-CLI vorhanden: $(cargo tauri --version)"
fi
# 4. Laufzeit-Voraussetzungen prüfen (nur Hinweise, keine Installation)
echo "--- [4/4] Laufzeit-Checks ---"
curl -s -o /dev/null http://127.0.0.1:11434/api/tags \
&& echo "✅ Ollama erreichbar" \
|| echo "⚠️ Ollama nicht erreichbar — 'ollama serve' bzw. läuft als Dienst?"
curl -s -o /dev/null http://127.0.0.1:8000/health \
&& echo "✅ SurrealDB erreichbar" \
|| echo "⚠️ SurrealDB nicht erreichbar — KAiOSS-Stack starten (../KAiOSS/start.sh start)"
curl -s -o /dev/null http://127.0.0.1:5174/desktop-bubble \
&& echo "✅ KAiOSS-Frontend + /desktop-bubble erreichbar" \
|| echo "⚠️ KAiOSS-Frontend nicht erreichbar — ../KAiOSS/start.sh start"
echo ""
echo "=== Setup fertig. Starten mit: ./run.sh ==="