X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=sync-all;h=caaed50c846a1208beee964893d6cc94919823d6;hp=0d0af6767f80c020efbcddd089cc5440b671c27d;hb=72a2b6d88d34caf92eeefd86cc69cad86b77a79c;hpb=b61c52db76972676b7ba112d8cb723ce18504024 diff --git a/sync-all b/sync-all index 0d0af67..caaed50 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:\/\/|https:\/\/)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")); @@ -282,7 +290,7 @@ sub scmall { } # Work out the arguments we should give to the SCM - if ($command =~ /^(?:w|wh|wha|what|whats|whatsn|whatsne|whatsnew)$/) { + if ($command =~ /^(?:w|wh|wha|what|whats|whatsn|whatsne|whatsnew|status)$/) { @scm_args = (($scm eq "darcs" and "whatsnew") or ($scm eq "git" and "status"));