#!/usr/bin/env bash ############################################################################### # GEEKCADE BOOTSTRAP # Lives at https://install.geekcade.com/install # # This is the one-liner-friendly entry point. Run it on a fresh Ubuntu # install to bootstrap the GeekCade cabinet: # # curl -fsSL https://install.geekcade.com/install | bash # # All it does: # 1. Fetch the latest geekcade_install.sh from install.geekcade.com/deploy/ # 2. Cache boot splash PNGs in ~ (used by installer if network drops later) # 3. Make the installer executable and run it # # The installer takes over from there. It fetches the menu, assets script, # sample ROM, and AttractMode Plus source as it goes. ############################################################################### set -e GEEKCADE_BASE_URL="${GEEKCADE_BASE_URL:-https://install.geekcade.com/deploy}" INSTALLER_URL="${GEEKCADE_BASE_URL}/geekcade_install.sh" INSTALLER_PATH="$HOME/geekcade_install.sh" _prefetch_asset() { local name="$1" local url="${GEEKCADE_BASE_URL}/${name}" local dest="$HOME/${name}" if [ -s "$dest" ]; then return 0 fi if wget -q -O "$dest" "$url" 2>/dev/null && [ -s "$dest" ]; then return 0 fi rm -f "$dest" return 1 } echo "" echo " ┌─────────────────────────────────────────────────┐" echo " │ GEEKCADE BOOTSTRAP v2.0 │" echo " └─────────────────────────────────────────────────┘" echo "" echo " Fetching the latest GeekCade installer:" echo " $INSTALLER_URL" echo "" if ! command -v wget >/dev/null 2>&1; then echo " ERROR: wget is not installed. On Ubuntu:" echo " sudo apt update && sudo apt install -y wget" exit 1 fi if ! wget -qO "$INSTALLER_PATH" "$INSTALLER_URL"; then echo "" echo " ERROR: failed to download installer." echo " Check your internet connection and try again." echo " If install.geekcade.com is down, try the legacy URL:" echo " wget -O geekcade_install.sh http://geekcade.geekfestclan.com/deploy/geekcade_install.sh" exit 1 fi if [ ! -s "$INSTALLER_PATH" ]; then echo " ERROR: installer downloaded but is empty." rm -f "$INSTALLER_PATH" exit 1 fi chmod +x "$INSTALLER_PATH" echo " Caching boot splash images..." _prefetch_asset geekcade_grub_splash.png || \ echo " WARNING: could not cache geekcade_grub_splash.png (installer will retry)" _prefetch_asset geekcade_grub_splash_muted.png || true echo " Installer saved to: $INSTALLER_PATH" echo " Launching..." echo "" exec "$INSTALLER_PATH" "$@"