dotfiles

commit 6acc12e137fccd0dd66aef2fc0bd16b644f772bd

Author: Honza Pokorny <me@honza.ca>

Clean up flashing script

 ergodox/compile_and_flash.sh | 13 +++++++++----


diff --git a/ergodox/compile_and_flash.sh b/ergodox/compile_and_flash.sh
index 0207545c293fc0cda629ab0db072c1544ce00b3b..260206a59f119b7c5ba86e12b64d0121ddc66de2 100644
--- a/ergodox/compile_and_flash.sh
+++ b/ergodox/compile_and_flash.sh
@@ -1,5 +1,10 @@
-cd ~/GitHub/qmk_firmware
+QMK_TREE=~/code/qmk_firmware
+TEENSY_BIN=~/code/teensy_loader_cli/teensy_loader_cli 
+
+pushd $QMK_TREE || exit
+
 make ergodox_ez:honza
-~/GitHub/teensy_loader_cli/teensy_loader_cli \
-    -mmcu=atmega32u4 -w ergodox_ez_honza.hex
-cd -
+
+$TEENSY_BIN -mmcu=atmega32u4 -w ergodox_ez_honza.hex
+
+popd || exit