Skip to content

Instantly share code, notes, and snippets.

@edwinclement08
Last active March 24, 2021 20:41
Show Gist options
  • Save edwinclement08/049e50e1446b93af8f7ec37513bb3ef0 to your computer and use it in GitHub Desktop.
Save edwinclement08/049e50e1446b93af8f7ec37513bb3ef0 to your computer and use it in GitHub Desktop.
compiles the given json file in qmk folder(with all the custom changes) and uploads it twice for split keyboard
#!/bin/sh
if [ $# -ne 1 ]
then
echo "Pass a single parameter, that is the location of qmk config json"
exit
fi
FILE=$1
if [ ! -f $FILE ]; then
echo "Config File $FILE does not exist."
exit
fi
cp $FILE ~/Downloads/key\ configurations
cd ~/Downloads/key\ configurations
echo '#include "keymap-pre.h"' > keymap.c
qmk json2c $FILE >> keymap.c
cd ~/qmk_firmware/keyboards/handwired/dactyl_manuform/5x6/keymaps/edwinclement08
cp ~/Downloads/key\ configurations/keymap.c .
echo "connect right split"
qmk flash
echo "connect left split"
qmk flash
cp ~/qmk_firmware/handwired_dactyl_manuform_5x6_edwinclement08.hex ~/Downloads/key\ configurations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment