install.sh
AArch64 (ARM64) architecture stringReferences curl flags and HTTP URL
SHA-2568c6a70e8fa2c8f9d2cce62708fdd6250c7a8624a07dcc5401156e24616cff188
Evidence
1#!/bin/sh
2#
3# Brokoli one-liner installer.
4#
5# Usage:
6# curl -fsSL https://brokoli.orkestri.site/install.sh | sh
7#
8# Environment variables:
9# BROKOLI_VERSION Install a specific release tag (default: latest).
10# BROKOLI_INSTALL_DIR Override the install directory (default: /usr/local/bin
11# if writable, else $HOME/.local/bin).
12# BROKOLI_NO_SETUP=1 Skip the interactive admin-user / start-server prompt.
13# BROKOLI_YES=1 Answer yes to every prompt non-interactively.
14#
15# The downloaded archive is checked against the release's checksums.txt
16# before anything is extracted. Any failure to verify stops the install.
17#
18# This script is POSIX-sh (no bashisms) and works with either curl or wget.
19#
20set -eu
21
22# ���──────────────── output helpers ─────────────────
23RED='' GREEN='' YELLOW='' BOLD='' DIM='' RESET=''
24if [ -t 1 ] && command -v tput >/dev/null 2>&1 && [ "$(tput colors 2>/dev/null || echo 0)" -ge 8 ]; then
25 RED=$(tput setaf 1); GREEN=$(tput setaf 2); YELLOW=$(tput setaf 3)
26 BOLD=$(tput bold); DIM=$(tput dim); RESET=$(tput sgr0)
27fi
28info() { printf '%s==>%s %s\n' "$GREEN" "$RESET" "$1"; }
29warn() { printf '%s!! %s%s\n' "$YELLOW" "$1" "$RESET" >&2; }
30die() …
35:8… l for Python and declarative pipelines on hosts that have no Node.
36report_node_runtime() {
37 if ! command -v node >/dev/null 2>&1; then
38 info "Node.js not found (optional; install Node.js >= 20 only for TypeScript code nodes)"
39 return
40 fi
41
42 NODE_VERSION=$(node --version 2>/dev/null || true)
43 NODE_MAJOR=$(printf '%s\n' "$NODE_VERSION" | sed -n 's/^v\([0-9][0-9]*\).*/\1/p')
44 if [ -n "$NODE_MAJOR" ] && [ "$NODE_MAJOR" -ge 20 ]; then
53:29… SHA-256 in lower case, using whichever tool the
54# platform has: sha256sum on Linux, shasum on macOS, openssl as a fallback.
55# It returns non-zero when none of them exists.
56sha256_of() {
57 if command …
57:35… null 2>&1; then
58 _sum=$(sha256sum "$1" | awk '{print $1}')
59 elif command -v shasum >/dev/null 2>&1; then
60 _sum=$(shasum -a 256 "$1" | awk '{print $1}')
61 elif command -v openssl >/dev/null 2>&1; then
62 _sum=$(openssl dgst -sha256 "$1" | awk '{print $NF}')
63 else
64 return 1
65 fi
66 printf '%s\n' "$_sum" | tr 'A-F' 'a-f'
67}
68
69# ─────────────� …
69:104… ────
70REPO="Tnsor-Labs/brokoli"
71VERSION="${BROKOLI_VERSION:-latest}"
72
73# Require curl OR wget.
74if command -v curl >/dev/null 2>&1; then
75 HTTP_GET='curl -fsSL'
76 HTTP_HEAD='curl -fsSLI'
77elif command -v wget >/dev/null 2>&1; then
78 HTTP_GET='wget -qO-'
79 HTTP_HEAD='wget -q --spider -S'
80else
81 die "neither curl nor wget found — install one of them and retry."
82fi
83
84command -v tar >/dev/null 2>&1 || die "tar not found — install it and …