#!/bin/sh # weatherstar kiosk installer bootstrap # # curl -fsSL https://weatherstar.ryanwarner.xyz | sh # # The same file is at https://raw.githubusercontent.com/ryan-warner/weatherstar/main/bootstrap.sh # Arguments after "--" go to the installer: # curl -fsSL https://weatherstar.ryanwarner.xyz | sh -s -- --help set -eu REPO_URL="${WEATHERSTAR_REPO:-https://github.com/ryan-warner/weatherstar}" REPO_DIR="${WEATHERSTAR_HOME:-$HOME/weatherstar}" say() { printf '\033[1;36mweatherstar\033[0m %s\n' "$*"; } die() { printf '\033[1;31mweatherstar\033[0m %s\n' "$*" >&2; exit 1; } [ "$(id -u)" -eq 0 ] && die "Run this as the user that will own the kiosk, not as root." [ -f /etc/debian_version ] || die "This installer targets Debian and Raspberry Pi OS." case "$(uname -m)" in aarch64|x86_64) ;; *) die "Bun needs a 64-bit OS. This machine reports $(uname -m)." ;; esac command -v sudo >/dev/null 2>&1 || die "sudo is required." apt_install() { sudo env DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends "$@" /dev/null 2>&1 || missing="$missing $pkg" done if [ -n "$missing" ]; then say "Installing$missing" sudo env DEBIAN_FRONTEND=noninteractive apt-get update -qq /dev/null; then exec bun install.ts "$@"