move get-arduino-pref out of the config file

tmp/arduino-cli-pre-rebase
Jesse Vincent 4 years ago
parent 142f9ed6a3
commit 1f227a0d72
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -450,6 +450,13 @@ do_compile () {
FQBN="${SAVED_FQBN}"
}
get_arduino_pref() {
pref=$1
# Strip the preference name. And then strip leading and trailing quotations
MESSAGE=$(dump_arduino_prefs | grep --max-count=1 ${pref}= | sed -e s/^.*${pref}=// -e 's/^"//' -e 's/"$//')
echo $MESSAGE
}
dump_arduino_prefs() {
if [ "x${_ARDUINO_PREFS}x" == "xx" ]; then

@ -52,13 +52,6 @@ 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 --max-count=1 ${pref}= | sed -e s/^.*${pref}=// -e 's/^"//' -e 's/"$//')
echo $MESSAGE
}
find_device_port() {
find_device_vid_pid

Loading…
Cancel
Save