summaryrefslogtreecommitdiff
path: root/sync-all
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-01-13 13:11:47 +0000
committerSimon Marlow <marlowsd@gmail.com>2011-01-13 13:11:47 +0000
commitdd8816cef0b896ccbd95f02ea78e6888315529b8 (patch)
tree46aaf483767e7185c9be7559ae36d70449391284 /sync-all
parentf5915d516dcf6aa48f028236593366ef61c7aad6 (diff)
downloadhaskell-dd8816cef0b896ccbd95f02ea78e6888315529b8.tar.gz
fix for remote repos without -r
Diffstat (limited to 'sync-all')
-rw-r--r--sync-all26
1 files changed, 13 insertions, 13 deletions
diff --git a/sync-all b/sync-all
index 930cfd2c5e..cfc44eae84 100644
--- a/sync-all
+++ b/sync-all
@@ -3,22 +3,12 @@
use strict;
use Cwd;
-# Figure out where to get the other repositories from,
-# based on where this GHC repo came from.
-my $branch = `git branch | grep "\* " | sed "s/^\* //"`; chomp $branch;
-my $remote = `git config branch.$branch.remote`; chomp $remote;
-my $defaultrepo = `git config remote.$remote.url`; chomp $defaultrepo;
-
-my $defaultrepo_base;
-my $checked_out_tree;
-
+my $defaultrepo;
my @packages;
-
my $verbose = 2;
my $ignore_failure = 0;
my $want_remote_repo = 0;
my $checked_out_flag = 0;
-
my $get_mode;
# Flags specific to a particular command
@@ -29,8 +19,18 @@ my %tags;
# Figure out where to get the other repositories from.
sub getrepo {
my $basedir = ".";
- my $repo = $defaultrepo || `cat $basedir/_darcs/prefs/defaultrepo`;
- chomp $repo;
+ my $repo;
+
+ if (defined($defaultrepo)) {
+ $repo = $defaultrepo;
+ chomp $repo;
+ } else {
+ # Figure out where to get the other repositories from,
+ # based on where this GHC repo came from.
+ my $branch = `git branch | grep "\* " | sed "s/^\* //"`; chomp $branch;
+ my $remote = `git config branch.$branch.remote`; chomp $remote;
+ $repo = `git config remote.$remote.url`; chomp $repo;
+ }
my $repo_base;
my $checked_out_tree;