summaryrefslogtreecommitdiff
path: root/keyboard/ergodox_ez/190hotfix.sh
diff options
context:
space:
mode:
authorIBNobody <protospherex@gmail.com>2016-03-22 20:39:05 -0500
committerIBNobody <protospherex@gmail.com>2016-03-22 20:39:05 -0500
commitec62d9e85cab5cf166241b0536120d005fa7c898 (patch)
tree5b2a544070d80833bb7668ffc34dc3143b62a3d5 /keyboard/ergodox_ez/190hotfix.sh
parent8a2457d7534ba082b52599e3af56f9e50e8dc38a (diff)
parent403d756ad56de18488e3d048e849c55e77a20b32 (diff)
Merge remote-tracking branch 'refs/remotes/jackhumbert/master'
# Conflicts: # quantum/template/template.c # quantum/template/template.h
Diffstat (limited to 'keyboard/ergodox_ez/190hotfix.sh')
-rwxr-xr-xkeyboard/ergodox_ez/190hotfix.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/keyboard/ergodox_ez/190hotfix.sh b/keyboard/ergodox_ez/190hotfix.sh
new file mode 100755
index 0000000000..bdc3adce22
--- /dev/null
+++ b/keyboard/ergodox_ez/190hotfix.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+#a tool to fix broken keymaps as a result of pull request #190
+#changing the declaration of matrix_scan_user() and matrix_init_user()
+#
+#This script will save a copy of the specified keymap as keymap.c.bak
+#and then create a new keymap.c with the definion corrected.
+#this script must be run from the ergodox_ez directory
+if [ $# -ne 1 ]; then
+ echo $0: usage: ./190hotfix keymap_name
+ exit 1
+fi
+
+echo Saving backup as ./keymaps/$1/keymap.c.bak ...
+mv ./keymaps/$1/keymap.c ./keymaps/$1/keymap.c.bak
+
+echo Modifying ./keymaps/$1/keymap.c ...
+cat ./keymaps/$1/keymap.c.bak | sed -r 's/^void \* matrix_/void matrix_/'>./keymaps/$1/keymap.c
+
+echo Complete!