forked from lutzroeder/netron
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bigdl
executable file
·33 lines (28 loc) · 1.01 KB
/
bigdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/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 --location --output "./third_party/source/bigdl/spark/dl/src/main/resources/serialization/bigdl.proto" "https://github.com/intel-analytics/BigDL/blob/master/spark/dl/src/main/resources/serialization/bigdl.proto?raw=true"
}
schema() {
echo "bigdl schema"
[[ $(grep -U $'\x0D' ./source/bigdl-proto.js) ]] && crlf=1
node ./tools/protoc.js --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