From 97675bd3242f6c65eb47eb71fc8cc1d90db89d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Fri, 16 Jun 2017 19:14:01 +0200 Subject: [PATCH] Use the right blhost binary on OSX. --- right/build/kds/blhost-unix.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/right/build/kds/blhost-unix.sh b/right/build/kds/blhost-unix.sh index 9ab2cee..d7fb0dd 100755 --- a/right/build/kds/blhost-unix.sh +++ b/right/build/kds/blhost-unix.sh @@ -5,7 +5,22 @@ PATH=$PATH:/usr/local/bin # This should make node and npm accessible on OSX. firmware_image=`pwd`/$1 usb_dir=../../../lib/agent/usb usb_binding=$usb_dir/node_modules/usb/build/Release/usb_bindings.node -blhost="../../../lib/bootloader/bin/Tools/blhost/linux/amd64/blhost --usb 0x1d50,0x6120" + +case "$(uname -s)" in + + Linux) + blhost_path=linux/amd64 + ;; + Darwin) + blhost_path=mac + ;; + *) + echo 'Your operating system is not supported.' + exit 1 + ;; +esac + +blhost="../../../lib/bootloader/bin/Tools/blhost/$blhost_path/blhost --usb 0x1d50,0x6120" set -x # echo on