-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathinstall.sh
More file actions
42 lines (34 loc) · 943 Bytes
/
install.sh
File metadata and controls
42 lines (34 loc) · 943 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
35
36
37
38
39
40
41
42
#!/bin/bash
set -e
VERSION="v6.8.0"
REPO="tang-vu/ContribAI"
INSTALL_DIR="/usr/local/bin"
# Detect OS and arch
OS=$(uname -s | tr "[:upper:]" "[:lower:]")
ARCH=$(uname -m)
case "$OS" in
linux) BINARY="contribai-linux-x86_64" ;;
darwin)
case "$ARCH" in
arm64|aarch64) BINARY="contribai-macos-aarch64" ;;
*) BINARY="contribai-macos-x86_64" ;;
esac ;;
*) echo "Unsupported OS: $OS"; exit 1 ;;
esac
URL="https://github.com/$REPO/releases/download/$VERSION/$BINARY"
echo "Installing ContribAI $VERSION..."
echo " OS: $OS | Arch: $ARCH"
echo " Binary: $BINARY"
echo " Downloading from: $URL"
echo ""
curl -fsSL "$URL" -o contribai
chmod +x contribai
if [ -w "$INSTALL_DIR" ]; then
mv contribai "$INSTALL_DIR/contribai"
else
echo "Need sudo to install to $INSTALL_DIR"
sudo mv contribai "$INSTALL_DIR/contribai"
fi
echo ""
echo "ContribAI installed successfully!"
echo "Run: contribai init"