#!/usr/bin/env bash # Shark-no-Shitaku bootstrap — curl target # curl -fsSL https://install.snowy-burbot.com | bash set -euo pipefail INSTALL_URL="https://install.snowy-burbot.com" TEMP_DIR="$(mktemp -d)" trap 'rm -rf "$TEMP_DIR"' EXIT # ───────────────────────────────────────────── # Colors # ───────────────────────────────────────────── CYAN='\033[0;36m' BOLD='\033[1m' DIM='\033[2m' RESET='\033[0m' cat << 'EOF' ___ _ _ / __|| |_ __ _ _ _| |__ \__ \| ' \ / _` | '_| / / |___/|_||_|\__,_|_| |_\_\ _ _ ___ ___ _ _ _ _ | ' \/ _ \ ___ / __| |_ (_) |_ __ _| |__ _ _ |_||_\___/|___| | \__ \ ' \| | _/ _` | / /| || | |___/_||_|_|\__\__,_|_\_\ \_,_| EOF echo -e "${BOLD}${CYAN}Shark-no-Shitaku — Personal environment bootstrap${RESET}" echo -e "${DIM}install.snowy-burbot.com${RESET}" echo "" # ───────────────────────────────────────────── # Dependency check # ───────────────────────────────────────────── for dep in curl sha256sum; do if ! command -v "$dep" &>/dev/null; then echo "Error: required dependency '$dep' not found." >&2 exit 1 fi done # ───────────────────────────────────────────── # Download installer # ───────────────────────────────────────────── echo -e "${DIM}Downloading installer...${RESET}" curl -fsSL "$INSTALL_URL/installer.sh" -o "$TEMP_DIR/installer.sh" curl -fsSL "$INSTALL_URL/checksums" -o "$TEMP_DIR/SHA256SUMS" chmod +x "$TEMP_DIR/installer.sh" # ───────────────────────────────────────────── # Checksum verification # ───────────────────────────────────────────── echo -e "${DIM}Verifying checksum...${RESET}" expected="$(grep "installer.sh" "$TEMP_DIR/SHA256SUMS" | awk '{print $1}')" if [[ -z "$expected" ]]; then echo "Error: no checksum found for installer.sh in checksums file." >&2 exit 1 fi actual="$(sha256sum "$TEMP_DIR/installer.sh" | awk '{print $1}')" if [[ "$expected" != "$actual" ]]; then echo "Error: checksum mismatch for installer.sh!" >&2 echo " Expected: $expected" >&2 echo " Actual: $actual" >&2 exit 1 fi echo -e "${CYAN}Checksum verified.${RESET}" echo "" # ───────────────────────────────────────────── # Hand off to installer # ───────────────────────────────────────────── exec "$TEMP_DIR/installer.sh" "$@"