Retrogame script: add PiGRRL Zero and Pocket

This commit is contained in:
Phillip Burgess 2016-12-13 12:51:44 -08:00
parent 5b97090f29
commit f59e46123e

View file

@ -1,6 +1,5 @@
#!/bin/bash
if [ $(id -u) -ne 0 ]; then
echo "Installer must be run as root."
echo "Try 'sudo bash $0'"
@ -36,6 +35,8 @@ echo
echo "Select configuration:"
selectN "PiGRRL 2 controls" \
"Pocket PiGRRL controls" \
"PiGRRL Zero controls" \
"Two buttons + joystick" \
"Six buttons + joystick" \
"Adafruit Arcade Bonnet" \
@ -43,9 +44,9 @@ selectN "PiGRRL 2 controls" \
RETROGAME_SELECT=$?
# These are the retrogame.cfg.* filenames on Github corresponding in
# order to each of the above selections (e.g. retrogame.cfg.pigrrl2):
CONFIGNAME=(pigrrl2 2button 6button bonnet)
CONFIGNAME=(pigrrl2 pocket zero 2button 6button bonnet)
if [ $RETROGAME_SELECT -lt 5 ]; then
if [ $RETROGAME_SELECT -lt 7 ]; then
if [ -e /boot/retrogame.cfg ]; then
echo "/boot/retrogame.cfg already exists."
echo "Continuing will overwrite file."
@ -81,7 +82,7 @@ if [ $RETROGAME_SELECT -lt 5 ]; then
# Add udev rule (will overwrite if present)
echo "SUBSYSTEM==\"input\", ATTRS{name}==\"retrogame\", ENV{ID_INPUT_KEYBOARD}=\"1\"" > /etc/udev/rules.d/10-retrogame.rules
if [ $RETROGAME_SELECT -eq 4 ]; then
if [ $RETROGAME_SELECT -eq 6 ]; then
# If Bonnet, make sure I2C is enabled. Call the I2C
# setup function in raspi-config (noninteractive):
raspi-config nonint do_i2c 0