Skip to content

BUILD.sh improvements on MacOS #20

Description

@derekmulcahy

The code for computing the FILESIZE in BUILD.sh is incorrect on MacOS.

FILESIZE=$(stat -s MicroPython.bin | cut -d' ' -s -f 1 | cut -d'=' -s -f 2)

is getting the value of the first field in the output of stat -s and this is st_dev=16777223 on my machine. Alternative implementations are

FILESIZE=$(eval $(stat -s MicroPython.bin); echo $st_size)

or

FILESIZE=$(stat -s MicroPython.bin | cut -d' ' -s -f 8 | cut -d'=' -s -f 2)

which also works for me but I am not sure if this is always true.

This code appears twice in BUILD.sh and both need updating.

Thanks for all the updates!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions