NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
More stuff for testing? (Score:1)
Re:More stuff for testing? (Score:2)
But this is the tool we use to do a live install of rt.cpan:
diesel:~# svn cat svn+ssh://svn.bestpractical.com/svn/bps-private/rt.cpan.org/pull-rt-cpan
root@
#!/usr/bin/env perl
my $root = $ENV{'RTHOME'} = "/opt/rt/rt.cpan.org-managed/";
use Cwd qw/getcwd abs_path/;
my @CO = qw{
svn+ssh://svn.bestpractical.com/svn/bps-public/rt/branches/3.6-RELEASE/
svn+ssh://svn.bestpractical.com/svn/bps-public/RT-Authen-Bitcard/
svn+ssh://svn.bestpractical.com/svn/bps-public/RT-Authen-OpenID/
svn+ssh://svn.bestpractical.com/svn/bps-public/RT-Authen-PAUSE/
svn+ssh://svn.bestpractical.com/svn/bps-public/RT-BugTracker/
svn+ssh://svn.bestpractical.com/svn/bps-public/RT-BugTracker-Public/
svn+ssh://svn.bestpractical.com/svn/bps-public/RT-Extension-MergeUsers/
svn+ssh://svn.bestpractical.com/svn/bps-public/RT-Extension-QuickDelete/
svn+ssh://svn.bestpractical.com/svn/bps-public/RT-Extension-rt_cpan_org/
svn+ssh://svn.bestpractical.com/svn/bps-private/rt.cpan.org/
};
my @UPDATE = qw{
RT-Extension-MergeUsers
RT-Authen-Bitcard
RT-Authen-PAUSE
RT-BugTracker
RT-BugTracker-Public
RT-Extension-rt_cpan_org
RT-Extension-QuickDelete
RT-Authen-OpenID
};
foreach my $url (@CO) {
print "Getting $url...\n";
`svn export --quiet --non-interactive $url`;
}
my $fully_installed = 1;
`cd 3.6-RELEASE && sh
INSTALL:
foreach my $module (@UPDATE) {
print "Trying to install $module...\n";
my $dir = getcwd();
opendir DIR, $dir or die "Can't open directory $dir: $!";
# Breadth-First Search on canonicalized directories
my @elts = filter_paths($dir, readdir DIR);
foreach my $elt (@elts) {
#print "Checking $elt\n"; # verbose
if ($elt !~
opendir SUBDIR, $elt or die "Can't open directory $elt: $!";
my @subelts = readdir SUBDIR;
@subelts = filter_paths($elt, @subelts);
push @elts, @subelts;
closedir SUBDIR;
next;
}
else {
print "Installing $module...\n";
`cd $elt && rm -rf inc && perl
next INSTALL;
}
}
print STDERR "*** Could not find module $module. Did not install.\n";
$fully_installed = 0;
}
if (!$fully_installed) {
print STDERR "Some modules were not able to be installed.\n";
print STDERR "You will need to install them manually.\n\n";
}
`cp rt.cpan.org/RT_SiteConfig.pm ${root}etc`;
#print "Remember to copy the RT_SiteConfig.pm file to the live directory!\n";
1;
sub filter_paths {
my $base_path = shift;
my @paths = @_;
return grep { ( -d $_) }
(map { abs_path("$base_path/$_") }
(grep {$_ !~
}
Reply to This
Parent