build.sh: add -f flag to append list of modules to a file.