Use a safer sed command to avoid locale issues

On some locales awk will generate commas instead of dots in the percentage. This will mess up the sed command. Instead of forcing awk to always generate dots we can simply cange the sed command to treat commas as regular text.
pull/248/head
Ole Krüger 7 years ago
parent d05c3cacf8
commit b729a2e291

@ -18,7 +18,7 @@ firmware_size () {
PERCENT="$(echo ${PROGSIZE} ${MAX_PROG_SIZE} | awk "{ printf \"%02.01f\", \$1 / \$2 * 100 }")"
echo "${output}" | sed -e "s,\(Program:.*\)(\([0-9\.]*%\) Full),\1(${PERCENT}% Full),"
echo "${output}" | sed -e "s/\(Program:.*\)(\([0-9\.]*%\) Full)/\1(${PERCENT}% Full)/"
}
find_sketch () {

Loading…
Cancel
Save