flatpy/install_flatc

14 lines
455 B
Bash
Executable File

#!/bin/bash -e
# Helper script to get the latest flatbuffers source from Github,
# build and install into the virtual env.
rm -fr /tmp/flatbuffers-source /tmp/flatbuffers-build
git clone https://github.com/google/flatbuffers /tmp/flatbuffers-source
mkdir /tmp/flatbuffers-build
cd /tmp/flatbuffers-build
cmake /tmp/flatbuffers-source -DCMAKE_INSTALL_PREFIX=$VIRTUAL_ENV
make -j$(nproc)
make install
rm -fr /tmp/flatbuffers-source /tmp/flatbuffers-build