diff options
author | Felix Uhl <iFreilicht@users.noreply.github.com> | 2016-08-18 12:02:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-18 12:02:31 +0200 |
commit | ed6ecff292eae378eb89bf6a7b5b8dd4229b84b7 (patch) | |
tree | b2290e1a983134e0d7fc2f328eb949c37d99961c /keyboards/satan/keymaps/iso_split_rshift/build.sh | |
parent | 73f13c8f26f7f3777cec9d3036628a7dd6021ee9 (diff) | |
parent | 8144ce8852f690d5772d80ed2b96ae4af201e266 (diff) |
Merge pull request #1 from jackhumbert/master
Merging from base Repo
Diffstat (limited to 'keyboards/satan/keymaps/iso_split_rshift/build.sh')
-rwxr-xr-x | keyboards/satan/keymaps/iso_split_rshift/build.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/keyboards/satan/keymaps/iso_split_rshift/build.sh b/keyboards/satan/keymaps/iso_split_rshift/build.sh new file mode 100755 index 0000000000..6b4b4568f5 --- /dev/null +++ b/keyboards/satan/keymaps/iso_split_rshift/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 |