-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·42 lines (33 loc) · 893 Bytes
/
install.sh
File metadata and controls
executable file
·42 lines (33 loc) · 893 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
# Masterblaster install script for Linux based operating systems.
# Requirements:
# * curl
# * uname
# * /tmp directory
set -e
VERSION="${MB_VERSION:-latest}"
BASE_URL="https://mb.stereos.ai"
# Detect OS
OS="$(uname -s | tr '[:upper:]' '[:lower:]')"
case "$OS" in
linux*) OS="linux" ;;
darwin*) OS="darwin" ;;
*) echo "Unsupported OS: $OS"; exit 1 ;;
esac
# Detect architecture
ARCH="$(uname -m)"
case "$ARCH" in
x86_64) ARCH="amd64" ;;
aarch64|arm64) ARCH="arm64" ;;
*) echo "Unsupported architecture: $ARCH"; exit 1 ;;
esac
# Download and install
DOWNLOAD_URL="$BASE_URL/$VERSION/$OS/$ARCH/mb"
INSTALL_DIR="${MB_INSTALL_DIR:-/usr/local/bin}"
echo "Downloading mb $VERSION for $OS/$ARCH ..."
curl -fsSL "$DOWNLOAD_URL" -o /tmp/mb
chmod +x /tmp/mb
echo "Installing to $INSTALL_DIR ..."
sudo mv /tmp/mb "$INSTALL_DIR/mb"
echo "Installed mb version:"
mb version