-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·66 lines (57 loc) · 1.83 KB
/
install.sh
File metadata and controls
executable file
·66 lines (57 loc) · 1.83 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
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
# Cicada Quick Install Script
# Usage: curl -sSL https://raw.githubusercontent.com/USERNAME/cicada/main/install.sh | bash
set -e
GITHUB_URL="${CICADA_GITHUB_URL:-https://github.com/USERNAME/cicada.git}"
INSTALL_DIR="${CICADA_INSTALL_DIR:-$HOME/.cicada}"
echo "=================================="
echo "Cicada MCP Quick Install"
echo "=================================="
echo ""
echo "Install Dir: $INSTALL_DIR"
echo ""
# Check if Python is available
if ! command -v python3 &> /dev/null; then
echo "Error: Python 3 is required but not found"
exit 1
fi
# Check Python version
PYTHON_VERSION=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
REQUIRED_VERSION="3.10"
if [ "$(printf '%s\n' "$REQUIRED_VERSION" "$PYTHON_VERSION" | sort -V | head -n1)" != "$REQUIRED_VERSION" ]; then
echo "Error: Python 3.10+ required. Found: $PYTHON_VERSION"
exit 1
fi
# Clone or update cicada
if [ -d "$INSTALL_DIR" ]; then
echo "Cicada already installed at $INSTALL_DIR"
echo "Updating..."
cd "$INSTALL_DIR"
git fetch --tags
LATEST_TAG=$(git describe --tags --abbrev=0)
if [ -n "$LATEST_TAG" ]; then
echo "Checking out latest release: $LATEST_TAG"
git checkout "$LATEST_TAG"
else
echo "No tags found, staying on current branch"
fi
else
echo "Downloading cicada..."
git clone "$GITHUB_URL" "$INSTALL_DIR"
cd "$INSTALL_DIR"
git fetch --tags
LATEST_TAG=$(git describe --tags --abbrev=0)
if [ -n "$LATEST_TAG" ]; then
echo "Checking out latest release: $LATEST_TAG"
git checkout "$LATEST_TAG"
else
echo "No tags found, using main branch"
fi
fi
# Run setup
cd "$INSTALL_DIR"
python3 setup.py
echo ""
echo "=================================="
echo "Installation complete!"
echo "=================================="