summaryrefslogtreecommitdiff
path: root/keyboards/satan/keymaps/iso_split_rshift/build.sh
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-08-17 21:11:59 -0400
committerGitHub <noreply@github.com>2016-08-17 21:11:59 -0400
commit1442a882d4dd11eea033c34308c8adf49be53e95 (patch)
tree564d3c7183c3b4c325749ad01e28cfff84496974 /keyboards/satan/keymaps/iso_split_rshift/build.sh
parentf59b61332fa9deab1fb21ab8af2f123238965c51 (diff)
parentc024de4a879cdab04f0473c29c6e9c4f6f28cbae (diff)
Merge pull request #640 from toneman77/iso_satan
heavily modified spacefn layout for iso boards using the satan PCB
Diffstat (limited to 'keyboards/satan/keymaps/iso_split_rshift/build.sh')
-rwxr-xr-xkeyboards/satan/keymaps/iso_split_rshift/build.sh42
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