contrib: build.sh: use Bash features