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
27 lines
675 B
Bash
Executable File
27 lines
675 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
pushd $(cd $(dirname ${0})/..; pwd) > /dev/null
|
|
|
|
case "${OSTYPE}" in
|
|
msys*|cygwin*|mingw*) python="winpty python";;
|
|
*) python="python3";;
|
|
esac
|
|
|
|
schema() {
|
|
echo "om schema"
|
|
[[ $(grep -U $'\x0D' ./source/om-proto.js) ]] && crlf=1
|
|
# https://github.com/Ascend/parser/blob/development/parser/proto/ge_ir.proto
|
|
node ./tools/protoc.js --binary --text --root om --out ./source/om-proto.js ./tools/om.proto
|
|
if [[ -n ${crlf} ]]; then
|
|
unix2dos --quiet --newfile ./source/om-proto.js ./source/om-proto.js
|
|
fi
|
|
}
|
|
|
|
while [ "$#" != 0 ]; do
|
|
command="$1" && shift
|
|
case "${command}" in
|
|
"schema") schema;;
|
|
esac
|
|
done
|