2
0

caffe-update 708 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=caffe
  9. repository=https://github.com/BVLC/${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/caffe.js'"
  19. ${node_modules}/protobufjs/bin/pbjs -t static-module -w closure -r caffe -o ${src}/caffe.js ${third_party}/${identifier}/src/caffe/proto/caffe.proto