Final move from meta-3.0 to meta-3.5
[p5sagit/p5-mst-13.2.git] / win32 / splittree.pl
CommitLineData
0a753a76 1use DirHandle;
2use AutoSplit;
3
4sub splitthis {
5my ($top,$base,$dest) = @_;
6my $d = new DirHandle $base;
7if (defined $d) {
8 while (defined($_ = $d->read)) {
9 next if $_ eq ".";
10 next if $_ eq "..";
68dc0745 11 my $entry = "$base\\$_";
0a753a76 12 my $entrywithouttop = $entry;
13 $entrywithouttop =~ s/^$top//;
14 if (-d $entry) {splitthis ($top,$entry,$dest);}
15 else {
16 next unless ($entry=~/pm$/i);
17 #print "Will run autosplit on $entry to $dest\n";
18 autosplit($entry,$dest,0,1,1);
19 };
20 };
21 };
22}
23
24splitthis $ARGV[0],$ARGV[0],$ARGV[1];