Update build.sh
Update build.sh

* More local vars to avoid code duplication
* Proper indentation
* readlink/greadlink is not needed
* Use SCRIPT_DIR instead of ROOTDIR

Change-Id: Ia5d64a05a1ac8b345825a0bacb378b5fb0ecb53a
GitOrigin-RevId: 152b43aefa38894d370eb25ecc68728037bb3570

google-coral/coralmicro,google-coral/coralmicro,google-coral/coralmicro,google-coral/coralmicro,google-coral/coralmicro