caffe-update 679 B

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