mediapipe 658 B

12345678910111213141516171819202122232425262728293031
  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 "mediapipe clean"
  9. rm -rf "./third_party/src/mediapipe"
  10. }
  11. sync() {
  12. bold "mediapipe sync"
  13. [ -d "./third_party/src/mediapipe" ] || git clone --quiet https://github.com/google/mediapipe.git "./third_party/src/mediapipe"
  14. pushd "./third_party/src/mediapipe" > /dev/null
  15. git pull --quiet --prune
  16. popd > /dev/null
  17. }
  18. while [ "$#" != 0 ]; do
  19. command="$1" && shift
  20. case "${command}" in
  21. "clean") clean;;
  22. "sync") sync;;
  23. "schema") schema;;
  24. esac
  25. done