Lift duplication of command to a var

pull/931/head
Jesse Vincent 4 years ago
parent 6bc8c4e243
commit 1865e33426
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -259,26 +259,21 @@ check_bootloader_port_and_flash () {
} }
flash_over_usb () { flash_over_usb () {
if [ "${ARDUINO_VERBOSE}" != "-verbose" ]; then
${AVRDUDE} \ FLASH_CMD=${AVRDUDE} \
-C "${AVRDUDE_CONF}" \ -C "${AVRDUDE_CONF}" \
-p"${MCU}" \ -p"${MCU}" \
-cavr109 \ -cavr109 \
-D \ -D \
-P "${DEVICE_PORT_BOOTLOADER}" \ -P "${DEVICE_PORT_BOOTLOADER}" \
-b57600 \ -b57600 \
"-Uflash:w:${HEX_FILE_PATH}:i" \ "-Uflash:w:${HEX_FILE_PATH}:i"
2>&1 |grep -v ^avrdude | grep -v '^$' |grep -v '^ ' | grep -vi programmer
if [ "${ARDUINO_VERBOSE}" != "-verbose" ]; then
${FLASH_CMD} 2>&1 |grep -v ^avrdude | grep -v '^$' |grep -v '^ ' | grep -vi programmer
return "${PIPESTATUS[0]}" return "${PIPESTATUS[0]}"
else else
${AVRDUDE} \ ${FLASH_CMD}
-C "${AVRDUDE_CONF}" \
-p"${MCU}" \
-cavr109 \
-D \
-P "${DEVICE_PORT_BOOTLOADER}" \
-b57600 \
"-Uflash:w:${HEX_FILE_PATH}:i"
return $? return $?
fi fi
} }

Loading…
Cancel
Save