| import os
|
| import git
|
|
|
| def download_repo(repo_url: str, destination: str = "repo"):
|
| """Clones a Git repository to a specified destination."""
|
| if os.path.exists(destination):
|
| print(f"Removing existing directory: {destination}")
|
| os.system(f"rm -rf {destination}")
|
|
|
| print(f"Cloning {repo_url} into {destination}...")
|
| git.Repo.clone_from(repo_url, destination)
|
| print("Clone completed!")
|
|
|
| if __name__ == "__main__":
|
| REPO_URL = os.getenv("REPO_URL", "https://github.com/taellinglin/Carmen.git")
|
| DEST_DIR = os.getenv("DEST_DIR", "repo")
|
|
|
| download_repo(REPO_URL, DEST_DIR)
|
|
|