1
0

phytium_standalone_sdk_install.py 742 B

123456789101112131415161718192021222324
  1. import os
  2. import subprocess
  3. def clone_repository(branch, commit_hash):
  4. repository_url = "https://gitee.com/phytium_embedded/phytium-standalone-sdk.git"
  5. target_folder = "../libraries/phytium_standalone_sdk"
  6. # Clone the repository
  7. subprocess.call(["git", "clone", "-b", branch, repository_url, target_folder])
  8. # Change to the cloned repository folder
  9. os.chdir(target_folder)
  10. # Checkout the specific commit
  11. subprocess.call(["git", "checkout", commit_hash])
  12. print("Repository cloned successfully to {}".format(os.getcwd()))
  13. if __name__ == "__main__":
  14. branch_to_clone = "master"
  15. commit_to_clone = "3a353d48ee1db27acf77241a62fb7e35c779e110"
  16. clone_repository(branch_to_clone, commit_to_clone)