updateArkcmake.py 831 B

12345678910111213141516171819
  1. #!/usr/bin/python
  2. # Author: Lenna X. Peterson (github.com/lennax)
  3. # Based on bash script by James Goppert (github.com/jgoppert)
  4. #
  5. # script used to update cmake modules from git repo, can't make this
  6. # a submodule otherwise it won't know how to interpret the CMakeLists.txt
  7. # # # # # # subprocess# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
  8. import os # for os.path
  9. import subprocess # for check_call()
  10. clone_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
  11. print(clone_path)
  12. os.chdir(clone_path)
  13. subprocess.check_call(["git", "clone", "git://github.com/arktools/arkcmake.git","arkcmake_tmp"])
  14. subprocess.check_call(["rm", "-rf", "arkcmake_tmp/.git"])
  15. if os.path.isdir("arkcmake"):
  16. subprocess.check_call(["rm", "-rf", "arkcmake"])
  17. subprocess.check_call(["mv", "arkcmake_tmp", "arkcmake"])