-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·34 lines (26 loc) · 863 Bytes
/
install.sh
File metadata and controls
executable file
·34 lines (26 loc) · 863 Bytes
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
#!/bin/sh
set -e
REPO="https://github.com/SimpleOpenSoftware/chronicle.git"
DIR="chronicle"
# Get latest release tag
TAG=$(curl -sL https://api.github.com/repos/SimpleOpenSoftware/chronicle/releases/latest | grep -o '"tag_name": *"[^"]*"' | head -1 | cut -d'"' -f4)
if [ -z "$TAG" ]; then
echo "error: could not determine latest release"
exit 1
fi
echo "Installing Chronicle $TAG..."
if [ -d "$DIR" ]; then
echo "error: directory '$DIR' already exists"
exit 1
fi
git clone --depth 1 --branch "$TAG" "$REPO" "$DIR"
cd "$DIR"
# Install uv if missing
if ! command -v uv > /dev/null 2>&1; then
echo "Installing uv package manager..."
curl -LsSf https://astral.sh/uv/install.sh | sh
. "$HOME/.local/bin/env" 2>/dev/null || export PATH="$HOME/.local/bin:$PATH"
fi
# Reconnect stdin for interactive wizard
exec < /dev/tty
./wizard.sh