Skip to content

Instantly share code, notes, and snippets.

@tmcinerney
Last active September 21, 2021 01:00
Raspberry Pi: RetroPie

Raspberry Pi: RetroPie

This Gist contains scripts to extend the provisioning of a fresh install of RetroPie by configuring:

Installation

  1. You can run the entire installation by changing the environment variable values for WPA_SSID and WPA_PSK. You will need to connected to the internet via ethernet in order to be able to curl the script to your Pi, but once run you should be able to remove the cable.

    export WPA_SSID=wifi_name; export WPA_PSK=wifi_password; curl -s -L http://go.trav.sh/pi_retropie | bash
  2. Once you check to see if everything ran correctly, reboot the system:

    sudo reboot
#!/usr/bin/env bash
#
#################################################
# RetroPie setup script, that from a base install
# configures the device to use WiFi, installs and
# runs the BitTorrent Sync daemon for management
# of ROMs, and uses the U.S. keyboard layout.
#################################################
set -e
## Configurable settings (via environment variables)
: ${WPA_SSID:?"Please set WPA_SSID"}
: ${WPA_PSK:?"Please set WPA_PSK"}
## Other settings
SCRIPT_PATH=http://go.trav.sh
TIMESTAMP=$(date +%s)
## Helper functions
# Pull down script from Gist and execute it
run_gist_script() {
SCRIPT_NAME=$1
echo "Executing remote script: $SCRIPT_NAME"
curl -s -L $SCRIPT_PATH/$SCRIPT_NAME?$TIMESTAMP | bash
}
## Install/configure all the things
run_gist_script "pi_wifi"
run_gist_script "pi_keyboard"
run_gist_script "pi_btsync"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment