-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·53 lines (46 loc) · 1.51 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·53 lines (46 loc) · 1.51 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
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
# Grove installer for Linux + macOS.
#
# Usage:
# curl -fsSL https://raw.githubusercontent.com/bearlike/Grove/main/install.sh | bash
# curl -fsSL https://raw.githubusercontent.com/bearlike/Grove/main/install.sh | bash -s -- --canary
#
# What it does:
# 1. Installs `uv` if it's not already on PATH (via Astral's official script).
# 2. Installs Grove as a uv tool: `uv tool install grove` (or git+main for canary).
#
# After install, run: grove --help
set -euo pipefail
REPO="${GROVE_REPO:-bearlike/Grove}"
SOURCE="grove"
for arg in "${@:-}"; do
case "$arg" in
--canary) SOURCE="git+https://github.com/${REPO}@main" ;;
--stable) SOURCE="grove" ;;
--git=*) SOURCE="${arg#--git=}" ;;
"" ) ;;
*)
echo "unknown flag: $arg" >&2
echo "usage: install.sh [--canary | --stable | --git=<spec>]" >&2
exit 2
;;
esac
done
if ! command -v uv >/dev/null 2>&1; then
echo "uv not found — installing via Astral's installer..."
curl -LsSf https://astral.sh/uv/install.sh | sh
# uv places its binary under ~/.local/bin (or similar); make it visible now.
export PATH="${HOME}/.local/bin:${HOME}/.cargo/bin:${PATH}"
fi
if ! command -v uv >/dev/null 2>&1; then
echo "uv installer ran but the binary is not on PATH." >&2
echo "Open a new shell or add ~/.local/bin to PATH and re-run." >&2
exit 1
fi
echo "installing grove from: ${SOURCE}"
uv tool install --force "${SOURCE}"
echo
echo "installed."
grove version 2>/dev/null || true
echo
echo "next: grove --help"