1#!/bin/bash 2 3# NOTE: Ensure you use flatc version 1.6.0 here! 4if [[ $(flatc --version | grep -Po "(?<=flatc version )([0-9]|\.)*(?=\s|$)") != "1.6.0" ]]; then 5echo "[ERROR] flatc version must be 1.6.0" 6exit 7fi 8 9# Generate the CHRE-side header file 10flatc --cpp -o ../generated/include/generated/ --scoped-enums \ 11 --cpp-ptr-type chre::UniquePtr chre_power_test.fbs 12 13# Generate the AP-side header file with some extra goodies 14flatc --cpp -o ./ --scoped-enums --gen-mutable \ 15 --gen-object-api chre_power_test.fbs 16