keras-update 593 B

12345678910111213141516171819202122232425
  1. #!/bin/bash
  2. set -e
  3. root=$(cd $(dirname ${0})/..; pwd)
  4. tools=${root}/tools
  5. third_party=${root}/third_party
  6. identifier=keras
  7. repository=https://github.com/keras-team/${identifier}.git
  8. mkdir -p ${third_party}
  9. if [ -d "${third_party}/${identifier}" ]; then
  10. git -C "${third_party}/${identifier}" fetch -p
  11. git -C "${third_party}/${identifier}" reset --hard origin/master
  12. else
  13. echo "Clone ${repository}..."
  14. git -C "${third_party}" clone --recursive ${repository}
  15. fi
  16. echo "Update '../src/keras-metadata.json'"
  17. pushd ${tools} > /dev/null
  18. python keras-metadata.py
  19. popd > /dev/null