#!/bin/sh
set -eu
R=/opt/struktur/hermes-terminal-reparatur/20260806_102149
for f in terminal-workspace.tsx terminal-panel.tsx swarm-terminal.tsx; do
case "$f" in
terminal-workspace.tsx) dst=/opt/struktur/hermes-ui-auswahl/hermes-workspace/src/components/terminal/terminal-workspace.tsx;;
terminal-panel.tsx) dst=/opt/struktur/hermes-ui-auswahl/hermes-workspace/src/components/terminal/terminal-panel.tsx;;
swarm-terminal.tsx) dst=/opt/struktur/hermes-ui-auswahl/hermes-workspace/src/components/swarm/swarm-terminal.tsx;;
esac
cp "$R/$f" "$dst"
done
cd /opt/struktur/hermes-ui-auswahl/hermes-workspace
docker build -t hermes-workspace:terminal-auth-fix-20260806-final .
OV=/opt/struktur/hermes-terminal-reparatur/20260806_110000_final_override.yaml
printf '%s\n' 'services:' ' hermes-workspace:' ' image: hermes-workspace:terminal-auth-fix-20260806-final' > "$OV"
cd /opt/struktur/hermes-ui-auswahl
docker compose -f compose.yaml -f "$OV" up -d hermes-workspace