summaryrefslogtreecommitdiff
path: root/sync-github-mirror
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2017-03-20 21:09:22 +0000
committerroot <root@kemper.freedesktop.org>2017-03-20 21:09:22 +0000
commit77812bfa95257a108551ca2b15a45998f2d81bce (patch)
tree11def852d3e17ef8f54d802221feab0ce8d981eb /sync-github-mirror
parent4ac1478db8bf14371107c6a1c21ad1f18245d3e8 (diff)
sync-github-mirror: only export git repos with git-daemon-export-okHEADmaster
This is just a failsafe for when I manually run signal-github-mirror in the wrong directory.
Diffstat (limited to 'sync-github-mirror')
-rwxr-xr-xsync-github-mirror3
1 files changed, 2 insertions, 1 deletions
diff --git a/sync-github-mirror b/sync-github-mirror
index 9b0bcd5..e617864 100755
--- a/sync-github-mirror
+++ b/sync-github-mirror
@@ -32,6 +32,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
import codecs
import os
+import os.path
import sys
import requests
import subprocess
@@ -130,7 +131,7 @@ def main ():
gh = GitHub ()
repo_name = get_repo_name ()
github_name = gh.normalize_name (repo_name)
- if not gh.check_if_repo_exists(repo_name):
+ if not gh.check_if_repo_exists(repo_name) and os.path.exists("git-daemon-export-ok"):
gh.create_github_repo (repo_name)
try:
out = tempfile.NamedTemporaryFile (prefix="github",suffix="std")