Skip to content

Instantly share code, notes, and snippets.

@thenoseman
Created May 4, 2017 18:25
Show Gist options
  • Save thenoseman/2535e7166709a301c6d2a67d1101e72e to your computer and use it in GitHub Desktop.
Save thenoseman/2535e7166709a301c6d2a67d1101e72e to your computer and use it in GitHub Desktop.
Updates the SDL2 gamecontrollerdb.txt for 8BitDo Zero Gamepads
#!/bin/bash
curl -o Contents/MacOS/gamecontrollerdb.txt "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt"
echo "What's is your gamepad GUID? (something like a0050000000000003232000000000000"
echo "Use http://www.generalarcade.com/gamepadtool/ for that."
read guid
grep "8Bitdo Zero GamePad" Contents/MacOS/gamecontrollerdb.txt | sed "s/05000000a00500003232000001000000/${guid}/" | sed "s/Linux/Mac OS X/" >> Contents/MacOS/gamecontrollerdb.txt
echo "Added '8Bitdo Zero GamePad' for Mac OS X to gamecontrollerdb.txt"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment