#!/usr/bin/env bash ############################################################################### # GEEKCADE ASSETS SYNC # USB Drive -> Cabinet Asset Copier # Version: v2.0 (build 38) # # Copies a Pleasuredome-format MAME assets bundle from a USB drive to # the cabinet, then updates ~/mame/mame.ini with the right paths. # # Usage: # geekcade_assets.sh Auto-detect USB, run all sections # geekcade_assets.sh --source PATH Use specific path as USB source # geekcade_assets.sh --check Only check if USB is detected, exit # geekcade_assets.sh --help Show this help # # Exit codes for --check: # 0 USB detected and looks valid # 1 USB not found or not valid ############################################################################### set -u # ============================== # [0] CONFIG # ============================== USB_LABEL="GEEKCADE" # Cabinet destination directories. These were created by the installer. MAME_DIR="$HOME/mame" MAME_INI="$MAME_DIR/mame.ini" ATTRACT_DIR="$HOME/attractplus" # Paths where USB drives typically auto-mount on Ubuntu. udisks2 uses # /media//