diff options
author | Eric Kunze <eric.kunze@arm.com> | 2021-08-24 14:11:47 -0700 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2021-11-04 16:13:49 -0700 |
commit | cc24c35c5be1967de520df60015a661b1dd6eb4c (patch) | |
tree | c6b98202a730fc7678d14e23ae3bafd3e7ad4714 /regenerate_headers.sh | |
parent | a687b616fdd6d6ff7c4e84498bc3cb9789769ecf (diff) | |
download | serialization_lib-cc24c35c5be1967de520df60015a661b1dd6eb4c.tar.gz |
Use pre-commit to catch out of date headers
Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I65983e5ddee7e4b1870530c2fb947177f5d4ca48
Diffstat (limited to 'regenerate_headers.sh')
-rwxr-xr-x | regenerate_headers.sh | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/regenerate_headers.sh b/regenerate_headers.sh index a7d2141..9fef94b 100755 --- a/regenerate_headers.sh +++ b/regenerate_headers.sh @@ -14,22 +14,24 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Bail if any of the commands fail +set -e if test -f "third_party/flatbuffers/flatc"; then echo "Found flatc, skip building..." else echo "flatc not found, building now..." - pushd third_party/flatbuffers/ + pushd third_party/flatbuffers/ > /dev/null cmake . make flatc -j8 - popd + popd > /dev/null fi -pushd include/ +pushd include/ > /dev/null ../third_party/flatbuffers/flatc --cpp ../schema/tosa.fbs -popd -pushd python/ +popd > /dev/null +pushd python/ > /dev/null ../third_party/flatbuffers/flatc --python ../schema/tosa.fbs -popd +popd > /dev/null |