Move sourcing build.sh to outside loop