2
0

tengine 628 B

1234567891011121314151617181920212223242526272829
  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 "tengine clean"
  9. rm -rf ./third_party/src/tengine
  10. }
  11. sync() {
  12. bold "tengine sync"
  13. [ -d "./third_party/src/tengine" ] || git clone --quiet --branch master https://github.com/OAID/Tengine.git "./third_party/src/tengine"
  14. pushd "./third_party/src/tengine" > /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. esac
  24. done