mxnet 818 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. set -e
  3. pushd $(cd $(dirname ${0})/..; pwd) > /dev/null
  4. bold() {
  5. echo "$(tty -s && tput bold)$1$(tty -s && tput sgr0)"
  6. }
  7. clean() {
  8. bold "mxnet clean"
  9. rm -rf "./third_party/src/mxnet"
  10. }
  11. sync() {
  12. bold "mxnet sync"
  13. [ -d "./third_party/src/mxnet" ] || git clone --quiet --recursive https://github.com/apache/incubator-mxnet.git "./third_party/src/mxnet"
  14. pushd "./third_party/src/mxnet" > /dev/null
  15. git pull --quiet --prune
  16. git submodule sync --quiet
  17. git submodule update --quiet --init --recursive
  18. popd > /dev/null
  19. }
  20. metadata() {
  21. bold "mxnet metadata"
  22. # python3 ./tools/mxnet-script.py
  23. }
  24. while [ "$#" != 0 ]; do
  25. command="$1" && shift
  26. case "${command}" in
  27. "clean") clean;;
  28. "sync") sync;;
  29. "metadata") metadata;;
  30. esac
  31. done