aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/ergodox/ez/190hotfix.sh
diff options
context:
space:
mode:
authorStanley Lai <stanleylai.sg@gmail.com>2016-12-17 13:49:13 -0800
committerStanley Lai <stanleylai.sg@gmail.com>2016-12-17 13:49:13 -0800
commitb49d7800aeae1009b39b2bff2121864425e73ce9 (patch)
treef73447fc32940c7bc6b691a83567186d1afbc991 /keyboards/ergodox/ez/190hotfix.sh
parent9ecf9073b96799e52a1f1c0d35b57177382902ce (diff)
parentae95834f5af7404c04e6fe3446019046278d814b (diff)
downloadfirmware-b49d7800aeae1009b39b2bff2121864425e73ce9.tar.gz
firmware-b49d7800aeae1009b39b2bff2121864425e73ce9.tar.bz2
firmware-b49d7800aeae1009b39b2bff2121864425e73ce9.zip
Merge remote-tracking branch 'refs/remotes/jackhumbert/master'
Diffstat (limited to 'keyboards/ergodox/ez/190hotfix.sh')
-rwxr-xr-xkeyboards/ergodox/ez/190hotfix.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/keyboards/ergodox/ez/190hotfix.sh b/keyboards/ergodox/ez/190hotfix.sh
new file mode 100755
index 000000000..bdc3adce2
--- /dev/null
+++ b/keyboards/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!