diff --git a/bin/abralib.py b/bin/abralib.py index e7722b7..e9a85c8 100644 --- a/bin/abralib.py +++ b/bin/abralib.py @@ -78,12 +78,15 @@ def get_repos_json(): exit(1) -def clone_all_apps(repos_json): +def clone_all_apps(repos_json, ssh=False): """Clone all Co-op Cloud apps to ~/.abra/apps.""" if not exists(CLONES_PATH): mkdir(CLONES_PATH) - repos = [[p["name"], p["ssh_url"]] for p in repos_json] + if ssh: + repos = [[p["name"], p["ssh_url"]] for p in repos_json] + else: + repos = [[p["name"], p["clone_url"]] for p in repos_json] for name, url in repos: if name in REPOS_TO_SKIP: diff --git a/bin/clone-all-apps.py b/bin/clone-all-apps.py index b9ec1f8..727b5c8 100755 --- a/bin/clone-all-apps.py +++ b/bin/clone-all-apps.py @@ -10,7 +10,7 @@ from abralib import clone_all_apps, get_repos_json def main(): """Run the script.""" repos_json = get_repos_json() - clone_all_apps(repos_json) + clone_all_apps(repos_json, ssh=True) main()