updated build.sh from @emmanuelez's comments