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.
pull/764/head
Jesse Vincent 5 years ago
parent 08ee5fbfe4
commit fd58a7ea5b
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -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
}

Loading…
Cancel
Save