From fea85506ecd9d036215a292b7ffdd328a25b6a83 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 20 Oct 2020 01:38:18 -0700 Subject: [PATCH] lift find_device_pid_vid to builder --- bin/kaleidoscope-builder | 7 +++++++ etc/kaleidoscope-builder.conf | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index b0543e4b..0c496b39 100755 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -195,6 +195,13 @@ find_sketch () { } +find_device_vid_pid() { + : ${VID:=$(get_arduino_pref 'build.vid')} + : ${SKETCH_PID:=$(get_arduino_pref 'build.pid')} + : ${BOOTLOADER_PID:=$(get_arduino_pref 'bootloader.pid')} + : ${BOOTLOADER_VID:=$(get_arduino_pref 'bootloader.vid')} +} + prompt_before_flashing () { flashing_instructions=$(get_arduino_pref 'build.flashing_instructions') diff --git a/etc/kaleidoscope-builder.conf b/etc/kaleidoscope-builder.conf index de7e8abb..da7b3b12 100644 --- a/etc/kaleidoscope-builder.conf +++ b/etc/kaleidoscope-builder.conf @@ -44,14 +44,6 @@ uname_S=$(uname -s 2>/dev/null || echo not) uname_O=$(uname -o 2>/dev/null || echo not) -find_device_vid_pid() { - : ${VID:=$(get_arduino_pref 'build.vid')} - : ${SKETCH_PID:=$(get_arduino_pref 'build.pid')} - : ${BOOTLOADER_PID:=$(get_arduino_pref 'bootloader.pid')} - : ${BOOTLOADER_VID:=$(get_arduino_pref 'bootloader.vid')} -} - - find_device_port() { find_device_vid_pid