Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
1.8 kB ยท 56 lines
Shell
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657#!/bin/sh# Wrapper to run entry.fish in background so VS Code can connect immediately# The heavy setup continues in background and creates .waiter when done
LOG_DIR="/workspaces/aesthetic-computer/.devcontainer/entry-logs"mkdir -p "$LOG_DIR"TIMESTAMP=$(date +%Y%m%d_%H%M%S)BG_LOG="$LOG_DIR/background-$TIMESTAMP.log"WRAPPER_LOG="$LOG_DIR/wrapper-$TIMESTAMP.log"
# Function to log with timestamplog() { MSG="[$(date '+%H:%M:%S.%3N')] $1" echo "$MSG" echo "$MSG" >> "$WRAPPER_LOG" sync 2>/dev/null}
log "๐ poststart-wrapper.sh starting"log "๐ Wrapper log: $WRAPPER_LOG"log "๐ Background log: $BG_LOG"log "๐ฅ๏ธ Hostname: $(hostname 2>/dev/null || cat /etc/hostname 2>/dev/null || echo 'unknown')"log "๐ค User: $(whoami)"log "๐ PWD: $(pwd)"
# Create a marker so we know wrapper was actually usedtouch "$LOG_DIR/.wrapper-used-$TIMESTAMP"log "โ
Created wrapper marker"
# Run entry.fish in background, redirect output to loglog "๐ Starting entry.fish in background..."nohup fish /workspaces/aesthetic-computer/.devcontainer/entry.fish > "$BG_LOG" 2>&1 &BG_PID=$!
log "โ
entry.fish started with PID: $BG_PID"
# Create symlinks to latest logsln -sf "$BG_LOG" "$LOG_DIR/latest-background.log"ln -sf "$WRAPPER_LOG" "$LOG_DIR/latest-wrapper.log"log "๐ Created symlinks to latest logs"
# Give a moment for critical early setup (dockerd, basic env)log "โณ Waiting 3 seconds for critical setup..."sleep 3
# Check if process is still runningif kill -0 $BG_PID 2>/dev/null; then log "โ
Background process still running (PID: $BG_PID)"else log "โ ๏ธ Background process may have exited early"fi
log "๐ Wrapper complete - VS Code can now connect"log "๐ Monitor progress: tail -f $BG_LOG"log "๐ poststart-wrapper.sh finished"