install_flatbuffers.sh
install_flatbuffers.sh - Overview
This script installs the FlatBuffers schema compiler (flatc
) on macOS and Linux systems. It uses brew
on macOS and builds from source on Linux.
Detailed Documentation
install_mac()
Purpose: Installs FlatBuffers on macOS using the Homebrew package manager.
Parameters: None
Returns: None
install_linux()
Purpose: Installs FlatBuffers on Linux by downloading the source code, building it, and copying the flatc
executable to /usr/local/bin
.
Parameters: None
Returns: None
Script Logic
The script first determines the operating system using uname -s
.
- If the system is Linux, it executes the
install_linux
function. - If the system is macOS (Darwin), it executes the
install_mac
function.