#!/bin/bash # Mission Control Sprint CLI Wrapper # Delegates to gantt-board sprint.sh for sprint operations # This maintains the architecture principle: CLI is passthrough to API set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Auto-detect gantt-board directory if not set if [[ -z "${GANTT_BOARD_DIR:-}" ]]; then # Try common locations if [[ -d "$SCRIPT_DIR/../../../gantt-board" ]]; then GANTT_BOARD_DIR="$SCRIPT_DIR/../../../gantt-board" elif [[ -d "$HOME/Documents/Projects/OpenClaw/Web/gantt-board" ]]; then GANTT_BOARD_DIR="$HOME/Documents/Projects/OpenClaw/Web/gantt-board" elif [[ -d "/Users/mattbruce/Documents/Projects/OpenClaw/Web/gantt-board" ]]; then GANTT_BOARD_DIR="/Users/mattbruce/Documents/Projects/OpenClaw/Web/gantt-board" fi fi # Verify gantt-board is available if [[ -z "${GANTT_BOARD_DIR:-}" ]]; then echo "Error: GANTT_BOARD_DIR not set and gantt-board not found" >&2 echo "" >&2 echo "Please set GANTT_BOARD_DIR to the path of your gantt-board installation:" >&2 echo " export GANTT_BOARD_DIR=/path/to/gantt-board" >&2 exit 1 fi if [[ ! -f "$GANTT_BOARD_DIR/scripts/sprint.sh" ]]; then echo "Error: gantt-board sprint.sh not found at $GANTT_BOARD_DIR/scripts/sprint.sh" >&2 echo "" >&2 echo "Please ensure gantt-board is installed correctly." >&2 exit 1 fi # Delegate all calls to gantt-board sprint.sh exec "$GANTT_BOARD_DIR/scripts/sprint.sh" "$@"