build.sh modified for mac os