Slightly more automated build

Change-Id: I4749d6cdda1edf57c225265136205179d59b415e
Improve build.sh for automation

Change-Id: Ifbef703e421342b0e0e99cd9d6c553dfc1ecf73d