7254f7b4d1
Build / Build (macos-latest) (push) Has been cancelled
Build / Build (ubuntu-latest) (push) Has been cancelled
Build / Build (windows-latest) (push) Has been cancelled
Build / Analyze (javascript) (push) Has been cancelled
Build / Analyze (python) (push) Has been cancelled
34 lines
1.0 KiB
Bash
Executable File
34 lines
1.0 KiB
Bash
Executable File
#!/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
|