interplane.Get Omega
Read in your language

spark-inquisitor

Ultra-fast compiled native Rust gatekeeper and automated code reviewer

Brought by drakestapleton

branch main Branches Tags History

spark-inquisitor / install.sh

40 lines · 1160 bytes Raw Blame History
1#!/bin/sh
2set -e
3
4REPO="aien-dev/spark-inquisitor"
5BIN_DIR="${HOME}/.local/bin"
6mkdir -p "${BIN_DIR}"
7
8OS=$(uname -s | tr "[:upper:]" "[:lower:]")
9ARCH=$(uname -m)
10
11if [ "${OS}" != "linux" ]; then
12 echo "Unsupported OS: ${OS}. Currently Linux aarch64 and x86_64 are supported."
13 exit 1
14fi
15
16case "${ARCH}" in
17 x86_64) TARGET_ARCH="x86_64" ;;
18 aarch64|arm64) TARGET_ARCH="aarch64" ;;
19 *) echo "Unsupported architecture: ${ARCH}"; exit 1 ;;
20esac
21
22echo "Installing spark-inquisitor (${OS}-${TARGET_ARCH}) into ${BIN_DIR}..."
23
24RELEASE_URL="https://github.com/${REPO}/releases/latest/download/spark-inquisitor-linux-${TARGET_ARCH}.tar.gz"
25
26if command -v curl >/dev/null 2>&1; then
27 curl -fsSL "${RELEASE_URL}" -o /tmp/spark-inquisitor.tar.gz
28elif command -v wget >/dev/null 2>&1; then
29 wget -qO /tmp/spark-inquisitor.tar.gz "${RELEASE_URL}"
30else
31 echo "Error: curl or wget required."
32 exit 1
33fi
34
35tar -xzf /tmp/spark-inquisitor.tar.gz -C "${BIN_DIR}" spark-inquisitor
36chmod +x "${BIN_DIR}/spark-inquisitor"
37rm -f /tmp/spark-inquisitor.tar.gz
38
39echo "spark-inquisitor successfully installed to ${BIN_DIR}/spark-inquisitor"
40"${BIN_DIR}/spark-inquisitor" doctor