1#!/bin/bash 2 3set -ex 4 5# Clone the oss-fuzz repository 6git clone https://github.com/google/oss-fuzz.git /tmp/ossfuzz 7 8if [[ ! -d /tmp/ossfuzz/projects/lz4 ]] 9then 10 echo "Could not find the lz4 project in ossfuzz" 11 exit 1 12fi 13 14# Modify the oss-fuzz Dockerfile so that we're checking out the current branch on travis. 15sed -i "s@https://github.com/lz4/lz4.git@-b $TRAVIS_BRANCH https://github.com/lz4/lz4.git@" /tmp/ossfuzz/projects/lz4/Dockerfile 16 17# Try and build the fuzzers 18pushd /tmp/ossfuzz 19python infra/helper.py build_image --pull lz4 20python infra/helper.py build_fuzzers lz4 21popd 22