Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
core aesthetic-launch.sh
1.8 kB · 59 lines
Shell
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960#!/usr/bin/env bash
# Ensure ~/.local/bin is in PATHexport PATH="$HOME/.local/bin:$PATH"
# Use a writable XDG config root so fish can create its state files# Detect if we're in a devcontainer or on macOSif [ -d "/workspaces/aesthetic-computer" ]; then # Devcontainer environment if [ -z "$XDG_CONFIG_HOME" ]; then export XDG_CONFIG_HOME="/workspaces/aesthetic-computer/.xdg" fi mkdir -p "$XDG_CONFIG_HOME/fish/functions"
FISH_CONFIG_FILE="$XDG_CONFIG_HOME/fish/config.fish" if [ ! -f "$FISH_CONFIG_FILE" ]; then cat <<'EOF' > "$FISH_CONFIG_FILE"source /workspaces/aesthetic-computer/.devcontainer/config.fishEOF fielse # macOS/local environment - use existing fish config if [ -z "$XDG_CONFIG_HOME" ]; then export XDG_CONFIG_HOME="$HOME/.config" fifi
echo "→ \$0 is: $0"echo "→ SHELL is: $SHELL"echo "→ USER is: $USER"echo "→ HOME is: $HOME"echo "→ PATH is: $PATH"echo "→ Current directory: $(pwd)"
# if command -v docker >/dev/null; then# echo "✅ Found 'docker' in PATH"# else# echo "❌ 'docker' not found in PATH"# fi
# Detect Fish shellif [[ "$SHELL" == *fish* ]]; then echo "🐟 Detected Fish shell" echo "🎬 Launching 'aesthetic' via Fish (login shell)" # Set marker so config.fish knows to auto-run aesthetic export AC_TASK_LAUNCH=1 exec fish --loginelse echo "🐚 Detected non-Fish shell" if command -v aesthetic > /dev/null; then echo "🎬 Launching 'aesthetic'" exec aesthetic elif command -v docker > /dev/null; then echo "🧹 Pruning Docker system" docker system prune -f fi clear echo -e "\n\033[1m 🟪 Please run the Aesthetic Platform from its development container.\033[0m\n"fi