Quote expansions in firmware_size() of bin/kaleidoscope-builder. I left

line 35 (the "output" variable) alone. Issue #299.
pull/305/head
Chris King-Parra 7 years ago committed by Gergely Nagy
parent bc5abd63ab
commit 03bdc34001

@ -34,9 +34,9 @@ firmware_size () {
output="$($@ | grep "\\(Program\\|Data\\):" | sed -e 's,^, - ,' && echo)" output="$($@ | grep "\\(Program\\|Data\\):" | sed -e 's,^, - ,' && echo)"
PROGSIZE="$(echo "${output}" | grep Program: | cut -d: -f2 | awk '{print $1}')" PROGSIZE="$(echo "${output}" | grep "Program:" | cut -d: -f2 | awk '{print $1}')"
PERCENT="$(echo ${PROGSIZE} ${MAX_PROG_SIZE} | awk "{ printf \"%02.01f\", \$1 / \$2 * 100 }")" 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)/"
} }

Loading…
Cancel
Save