From fd58a7ea5bf82735bdf9a48c2edaeb6bd4aadd0b Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Mon, 2 Mar 2020 16:41:00 -0800 Subject: [PATCH] Update our preferences logic to get the first returned matching preference and to allow submenu preferences, like the program size for teensy variants. I -believe- this will work on macOS, but need to test. --- etc/kaleidoscope-builder.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/kaleidoscope-builder.conf b/etc/kaleidoscope-builder.conf index 32a417e0..37050040 100644 --- a/etc/kaleidoscope-builder.conf +++ b/etc/kaleidoscope-builder.conf @@ -60,7 +60,7 @@ find_device_vid_pid() { get_arduino_pref() { pref=$1 # Strip the preference name. And then strip leading and trailing quotations - MESSAGE=$(dump_arduino_prefs | grep ${pref}= | sed -e s/^${pref}=// -e 's/^"//' -e 's/"$//') + MESSAGE=$(dump_arduino_prefs | grep --max-count=1 ${pref}= | sed -e s/^.*${pref}=// -e 's/^"//' -e 's/"$//') echo $MESSAGE }