| 123456789101112131415161718192021222324252627282930313233 |
- #!/bin/bash
- set -e
- pushd $(cd $(dirname ${0})/..; pwd) > /dev/null
- clean() {
- echo "bigdl clean"
- rm -rf ./third_party/source/bigdl
- }
- sync() {
- echo "bigdl sync"
- mkdir -p "./third_party/source/bigdl/spark/dl/src/main/resources/serialization"
- curl --silent --show-error --location --output "./third_party/source/bigdl/spark/dl/src/main/resources/serialization/bigdl.proto" "https://github.com/intel-analytics/BigDL/raw/master/spark/dl/src/main/resources/serialization/bigdl.proto"
- }
- schema() {
- echo "bigdl schema"
- [[ $(grep -U $'\x0D' ./source/bigdl-proto.js) ]] && crlf=1
- node ./tools/protoc.js --binary --root bigdl --out ./source/bigdl-proto.js ./third_party/source/bigdl/spark/dl/src/main/resources/serialization/bigdl.proto
- if [[ -n ${crlf} ]]; then
- unix2dos --quiet --newfile ./source/bigdl-proto.js ./source/bigdl-proto.js
- fi
- }
- while [ "$#" != 0 ]; do
- command="$1" && shift
- case "${command}" in
- "clean") clean;;
- "sync") sync;;
- "schema") schema;;
- esac
- done
|