[helper] generated build.sh fixes

- fix permissions to allow execute
- add examples to template
This commit is contained in:
Oliver Chang 2016-09-02 09:57:31 -07:00
parent 9caeaaca37
commit 1479b3a76e
2 changed files with 15 additions and 1 deletions

View File

@ -224,9 +224,11 @@ def generate(generate_args):
with open(os.path.join(args.library_name, 'Dockerfile'), 'w') as f:
f.write(templates.DOCKER_TEMPLATE % args.library_name)
with open(os.path.join(args.library_name, 'build.sh'), 'w') as f:
build_sh_path = os.path.join(args.library_name, 'build.sh')
with open(build_sh_path, 'w') as f:
f.write(templates.BUILD_TEMPLATE % args.library_name)
os.chmod(build_sh_path, 0755)
return 0

View File

@ -84,4 +84,16 @@ BUILD_TEMPLATE = """
cd /src/%s
# build the library.
# e.g.
#
# ./autogen.sh
# ./configure
# make clean all
# build your fuzzer(s)
# e.g.
# $CXX $CXXFLAGS -std=c++11 -Iinclude \\
# /path/to/name_of_fuzzer.cc -o /out/name_of_fuzzer \\
# /work/libfuzzer/*.o /path/to/library.a $LDFLAGS
"""