X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=darcs-all;h=1cc2b243387bf187058258e19d5a39fbbdcbf1fd;hb=366614a9a33b30c2273d2c63b3435259f729314b;hp=24ed6f482a3a872c0aaf5f1f024f066ea335cc83;hpb=e05f9de137269701df667b69d741dfae616694f7;p=ghc-hetmet.git diff --git a/darcs-all b/darcs-all index 24ed6f4..1cc2b24 100644 --- a/darcs-all +++ b/darcs-all @@ -11,8 +11,10 @@ chomp $defaultrepo; my $defaultrepo_base; my $defaultrepo_lib; -if ($defaultrepo =~ /:/) { +if ($defaultrepo =~ /^...*:/) { # HTTP or SSH + # Above regex says "at least two chars before the :", to avoid + # catching Win32 drives ("C:\"). $defaultrepo_base = $defaultrepo; $defaultrepo_base =~ s#/[^/]+/?$##; $defaultrepo_lib = "$defaultrepo_base/packages"; @@ -62,6 +64,7 @@ sub darcs { } sub darcsall { + my @packages; darcs @_; for my $dir (@top_dirs) { if (-d $dir && -d "$dir/_darcs") { @@ -71,12 +74,25 @@ sub darcsall { message "== $dir not present or not a repository; skipping"; } } - for my $pkg (`cat libraries/boot-packages libraries/extra-packages`) { - chomp $pkg; - if (-d "libraries/$pkg") { - darcs (@_, "--repodir", "libraries/$pkg"); + for my $path () { + chomp $path; + if ($path =~ m#/(.*)/#) { + my $pkg = $1; + # bootstrapping.* are just copies of other repos; we don't + # update them directly. + if ($pkg !~ /bootstrapping/) { + darcs (@_, "--repodir", "libraries/$pkg"); + } } else { + die "that pattern can't fail!"; + } + } + @packages = `cat libraries/boot-packages`; + # @packages = `cat libraries/boot-packages libraries/extra-packages`; + for my $pkg (@packages) { + chomp $pkg; + if (! -d "libraries/$pkg") { warning("$pkg doesn't exist, use 'darcs-all get' to get it"); } }