|
|
@ -24,8 +24,8 @@ build_filenames () {
|
|
|
|
|
|
|
|
|
|
|
|
firmware_size () {
|
|
|
|
firmware_size () {
|
|
|
|
if [ "${BOARD}" = "virtual" ]; then
|
|
|
|
if [ "${BOARD}" = "virtual" ]; then
|
|
|
|
echo "[Size not computed for virtual build]"
|
|
|
|
echo "[Size not computed for virtual build]"
|
|
|
|
return
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
## This is a terrible hack, please don't hurt me. - algernon
|
|
|
|
## This is a terrible hack, please don't hurt me. - algernon
|
|
|
@ -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)/"
|
|
|
|
}
|
|
|
|
}
|
|
|
|