2
0

coreml-update 717 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. set -e
  3. root=$(cd $(dirname ${0})/..; pwd)
  4. node_modules=${root}/node_modules
  5. src=${root}/src
  6. tools=${root}/tools
  7. third_party=${root}/third_party
  8. identifier=coremltools
  9. repository=https://github.com/apple/${identifier}.git
  10. mkdir -p ${third_party}
  11. if [ -d "${third_party}/${identifier}" ]; then
  12. git -C "${third_party}/${identifier}" fetch -p
  13. git -C "${third_party}/${identifier}" reset --hard origin/master
  14. else
  15. echo "Clone ${repository}..."
  16. git -C "${third_party}" clone --recursive ${repository}
  17. fi
  18. echo "Generate '../src/coreml.js'"
  19. ${node_modules}/protobufjs/bin/pbjs -t static-module -w closure -r coreml -o ${src}/coreml.js ${third_party}/${identifier}/mlmodel/format/Model.proto