-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-local.sh
More file actions
executable file
·44 lines (36 loc) · 1.2 KB
/
install-local.sh
File metadata and controls
executable file
·44 lines (36 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env bash
# install-local.sh — build from source and install cupi + Claude Code skill
set -euo pipefail
BINARY="cupi"
SKILL_NAME="cupi"
INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}"
SKILL_DIR="$HOME/.claude/skills/$SKILL_NAME"
# Must be run from the project root
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$SCRIPT_DIR"
echo "==> Building $BINARY..."
VERSION=$(git describe --tags --always --dirty 2>/dev/null || echo "dev")
go build -ldflags "-X github.com/Cloverhound/cupi-cli/cmd.Version=${VERSION}" -o "$BINARY" .
echo "==> Installing binary to $INSTALL_DIR/$BINARY"
mkdir -p "$INSTALL_DIR"
cp "$BINARY" "$INSTALL_DIR/$BINARY"
chmod +x "$INSTALL_DIR/$BINARY"
rm "$BINARY"
echo "==> Installing Claude Code skill to $SKILL_DIR/"
mkdir -p "$SKILL_DIR"
cp skill/SKILL.md "$SKILL_DIR/SKILL.md"
echo ""
echo "Done."
echo ""
echo " Binary : $INSTALL_DIR/$BINARY"
echo " Skill : $SKILL_DIR/SKILL.md"
echo ""
# PATH check
if ! command -v "$BINARY" &>/dev/null; then
echo "NOTE: $INSTALL_DIR is not in your PATH."
echo "Add this to your shell profile (~/.zshrc or ~/.bashrc):"
echo ""
echo " export PATH=\"\$PATH:$INSTALL_DIR\""
echo ""
fi
echo "Run 'cupi --help' to get started."