update_grandalf.sh 695 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # delete stale grandalf
  3. rm -rf ./grandalf
  4. # oddly, github can convert to svn and then I can checkout the folder as an svn repo...?
  5. # get it
  6. svn checkout https://github.com/bdcht/grandalf/trunk/grandalf/
  7. # delete the .svn stuff and the __pycache__ if they exist
  8. rm -rf ./grandalf/.svn
  9. if [[ -d "./grandalf/__pycache__" ]]
  10. then
  11. rm -r ./grandalf/__pycache__
  12. fi
  13. if [[ -d "./grandalf/utils/__pycache__" ]]
  14. then
  15. rm -r ./grandalf/utils/__pycache__
  16. fi
  17. # fix the imports, they need to be made relative to Mantis.
  18. sed -i 's/grandalf\.utils/.utils/g' ./grandalf/*.py # annoyingly, it isn't consistent in the repo
  19. sed -i 's/\.utils/mantis.grandalf.utils/g' ./grandalf/*.py
  20. # this works