add lock to build.sh