summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-09-18 15:10:56 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-09-18 15:10:56 +0200
commit39d54ca82779bdea9563bc8bd058a34e97e54852 (patch)
treebf9439f0ea3c98a53b903d32e3d71f0912f9f998
parentUse control master in ssh and work around github deletion bugs. (diff)
downloadGitTools-39d54ca82779bdea9563bc8bd058a34e97e54852.tar.xz
GitTools-39d54ca82779bdea9563bc8bd058a34e97e54852.zip
Don't delete if it's a fork.
-rwxr-xr-xsync-github.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sync-github.py b/sync-github.py
index 687e01c..6eb3fa5 100755
--- a/sync-github.py
+++ b/sync-github.py
@@ -65,13 +65,13 @@ def main(argv):
github.repos.create(dict(name=repo.name, description=repo.description, homepage=repo.homepage, private=False, has_issues=False, has_wiki=False, has_downloads=False))
for repo in remote_repos:
- if repo.name not in [local.name for local in local_repos]:
+ if repo.name not in [local.name for local in local_repos] and not repo.fork:
print "[-] Deleting repository %s." % repo.name
try:
github.repos.delete(repo=repo.name, user=user)
except:
pass
-
+
print "[#] Connecting to github ssh."
control_master = os.path.abspath(os.path.dirname(__file__) + "/.ssh-control-" + str(uuid.uuid4()))
ssh_cmd = control_master + ".cmd.sh"