rknn 490 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. set -e
  3. pushd $(cd $(dirname ${0})/..; pwd) > /dev/null
  4. schema() {
  5. echo "rknn schema"
  6. [[ $(grep -U $'\x0D' ./source/rknn-schema.js) ]] && crlf=1
  7. node ./tools/flatc.js --root rknn --out ./source/rknn-schema.js ./tools/rknn.fbs
  8. if [[ -n ${crlf} ]]; then
  9. unix2dos --quiet --newfile ./source/rknn-schema.js ./source/rknn-schema.js
  10. fi
  11. }
  12. while [ "$#" != 0 ]; do
  13. command="$1" && shift
  14. case "${command}" in
  15. "schema") schema;;
  16. esac
  17. done