Created
May 4, 2017 18:25
-
-
Save thenoseman/2535e7166709a301c6d2a67d1101e72e to your computer and use it in GitHub Desktop.
Updates the SDL2 gamecontrollerdb.txt for 8BitDo Zero Gamepads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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