summaryrefslogtreecommitdiff
path: root/NetWare/splittree.pl
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-04-22 15:15:22 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-22 15:15:22 +0000
commit011f1a1a00b94fe919083a224d5df636f05ae32a (patch)
treecd77ae1fdc3803f999aabf2d8c618c7a1a9a0a76 /NetWare/splittree.pl
parente41d30bc98dce1dea5c4a5747bd838c25bdeda5d (diff)
downloadperl-011f1a1a00b94fe919083a224d5df636f05ae32a.tar.gz
NetWare changeover from Watcom to Codewarrior, from C Aditya.
p4raw-id: //depot/perl@16076
Diffstat (limited to 'NetWare/splittree.pl')
-rw-r--r--NetWare/splittree.pl24
1 files changed, 24 insertions, 0 deletions
diff --git a/NetWare/splittree.pl b/NetWare/splittree.pl
new file mode 100644
index 0000000000..3c76daadb1
--- /dev/null
+++ b/NetWare/splittree.pl
@@ -0,0 +1,24 @@
+use DirHandle;
+use AutoSplit;
+
+sub splitthis {
+my ($top,$base,$dest) = @_;
+my $d = new DirHandle $base;
+if (defined $d) {
+ while (defined($_ = $d->read)) {
+ next if $_ eq ".";
+ next if $_ eq "..";
+ my $entry = "$base\\$_";
+ my $entrywithouttop = $entry;
+ $entrywithouttop =~ s/^$top//;
+ if (-d $entry) {splitthis ($top,$entry,$dest);}
+ else {
+ next unless ($entry=~/pm$/i);
+ #print "Will run autosplit on $entry to $dest\n";
+ autosplit($entry,$dest,0,1,1);
+ };
+ };
+ };
+}
+
+splitthis $ARGV[0],$ARGV[0],$ARGV[1];