|
|
@@ -58,7 +58,16 @@ schema() {
|
|
|
brew list flatbuffers > /dev/null 2>&1 || brew install flatbuffers > /dev/null
|
|
|
;;
|
|
|
msys*)
|
|
|
- [ -x "$(command -v flatc)" ] || $(choco install flatc) > /dev/null
|
|
|
+ flatc_version=$(curl -s https://api.github.com/repos/google/flatbuffers/releases/latest | grep tag_name | cut -f 2 -d : | cut -f 2 -d '"')
|
|
|
+ flatc_dir=./third_party/bin/flatbuffers/${flatc_version}
|
|
|
+ if [ ! -f "${flatc_dir}/flatc.exe" ]; then
|
|
|
+ mkdir -p "${flatc_dir}"
|
|
|
+ pushd "${flatc_dir}" > /dev/null
|
|
|
+ curl -sL -O https://github.com/google/flatbuffers/releases/download/${flatc_version}/flatc_windows.zip
|
|
|
+ unzip flatc_windows.zip > /dev/null
|
|
|
+ popd > /dev/null
|
|
|
+ fi
|
|
|
+ flatc=${flatc_dir}/flatc.exe
|
|
|
;;
|
|
|
esac
|
|
|
[[ $(grep -U $'\x0D' ./src/tflite-schema.js) ]] && crlf=1
|