diff options
author | peepeetee <[email protected]> | 2022-04-20 03:19:34 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2022-04-20 05:19:34 +1000 |
commit | bd8220e9fc871d7997f1565858bb7b3c77756237 (patch) | |
tree | ec07a369e9d72168c0c491e2030a4ff798a5df9d /keyboards/amjkeyboard/amj40/keymaps/myee/build.sh | |
parent | 314865f83366fbaa547540154e0d2a48e7a2e72c (diff) | |
download | qmk_firmware-bd8220e9fc871d7997f1565858bb7b3c77756237.tar.gz qmk_firmware-bd8220e9fc871d7997f1565858bb7b3c77756237.zip |
move amj keyboards into amjkeyboard vendor folder (#15733)
Co-authored-by: Nick Brassel <[email protected]>
Diffstat (limited to 'keyboards/amjkeyboard/amj40/keymaps/myee/build.sh')
-rw-r--r-- | keyboards/amjkeyboard/amj40/keymaps/myee/build.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/keyboards/amjkeyboard/amj40/keymaps/myee/build.sh b/keyboards/amjkeyboard/amj40/keymaps/myee/build.sh new file mode 100644 index 0000000000..6b4b4568f5 --- /dev/null +++ b/keyboards/amjkeyboard/amj40/keymaps/myee/build.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# adjust for cpu +# -j 16 gave best result on a hyperthreaded quad core core i7 + +LIMIT=10 +THREADS="-j 16" +KMAP=iso_split_rshift + +echo "We need sudo later" +sudo ls 2>&1 /dev/null + +function wait_bootloader { + echo "Waiting for Bootloader..." + local STARTTIME=$(date +"%s") + local REMIND=0 + local EXEC=dfu-programmer + local TARGET=atmega32u4 + while true + do + sudo $EXEC $TARGET get > /dev/null 2>&1 + [ $? -eq 0 ] && break + ENDTIME=$(date +"%s") + DURATION=$(($ENDTIME-$STARTTIME)) + if [ $REMIND -eq 0 -a $DURATION -gt $LIMIT ] + then + echo "Did you forget to press the reset button?" + REMIND=1 + fi + sleep 1 + done +} +make clean +make KEYMAP=${KMAP} ${THREADS} +if [[ $? -eq 0 ]] +then + echo "please trigger flashing!" + wait_bootloader + sudo make KEYMAP=${KMAP} dfu ${THREADS} +else + echo "make failed" + exit 77 +fi |