Files
AIPass/setup-workspace.sh
T
AIOSAIandClaude Opus 4.6 7a1dc3ea2c fix(docker): track setup-workspace.sh for clean remote builds
setup-workspace.sh was gitignored but required by Dockerfile COPY.
Building from a fresh clone would fail. Now tracked.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 16:33:31 -08:00

34 lines
967 B
Bash

#!/bin/bash
set -e
WORKSPACE="/home/coder/workspace"
PROJECT="$WORKSPACE/AIPass"
FORK="git@github.com:Input-X/AIPass.git"
UPSTREAM="git@github.com:AIOSAI/AIPass.git"
export PATH="/opt/venv/bin:$PATH"
# Ensure workspace directory exists and is writable
mkdir -p "$WORKSPACE"
if [ ! -w "$WORKSPACE" ]; then
echo "==> Fixing workspace permissions..."
sudo chown -R coder:coder "$WORKSPACE"
fi
# Clone repo if not already present
if [ ! -d "$PROJECT/.git" ]; then
echo "==> First boot: cloning into AIPass/..."
git clone "$FORK" "$PROJECT"
cd "$PROJECT"
git remote add upstream "$UPSTREAM"
echo "==> Installing AIPass in editable mode..."
pip install -e .
echo "==> Workspace ready!"
echo "==> origin = $FORK (your fork - push here)"
echo "==> upstream = $UPSTREAM (pull updates from here)"
else
echo "==> Workspace exists, ensuring deps are installed..."
cd "$PROJECT"
pip install -e . 2>/dev/null || true
fi