dlc 483 B

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