From 2688d8db92fb9a1b766b77aaa54549d171a08826 Mon Sep 17 00:00:00 2001 From: Thomas Schilling Date: Mon, 4 Apr 2011 14:00:54 +0100 Subject: [PATCH] Make sync-all work with the GitHub mirror. --- sync-all | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sync-all b/sync-all index 0d0af67..729dbd3 100755 --- a/sync-all +++ b/sync-all @@ -228,6 +228,8 @@ sub scmall { my ($repo_base, $checked_out_tree) = getrepo(); + my $is_github_repo = $repo_base =~ m/(git@|git:\/\/)github.com/; + parsePackages; @args = (); @@ -270,6 +272,12 @@ sub scmall { $scm = $$line{"vcs"}; $upstream = $$line{"upstream"}; + # We can't create directories on GitHub, so we translate + # "package/foo" into "package-foo". + if ($is_github_repo) { + $remotepath =~ s/\//-/; + } + # Check the SCM is OK as early as possible die "Unknown SCM: $scm" if (($scm ne "darcs") and ($scm ne "git")); -- 1.7.10.4