summaryrefslogtreecommitdiff
path: root/wince/splittree.pl
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-08-02 13:25:43 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-08-02 13:25:43 +0000
commite1caacb4fdb62cb28dc825ca0115faf95e569339 (patch)
tree82b5eb0dc32a568bebeaf78d402b2441de840112 /wince/splittree.pl
parent6f2ad931e2b0390c895341c3cd8e3fad2616118f (diff)
downloadperl-e1caacb4fdb62cb28dc825ca0115faf95e569339.tar.gz
Integrate the PerlCE (WinCE Perl) port;
kindly supplied by Rainer Keuchel <rkeuc@allgeier.com>. p4raw-id: //depot/perl@11549
Diffstat (limited to 'wince/splittree.pl')
-rw-r--r--wince/splittree.pl24
1 files changed, 24 insertions, 0 deletions
diff --git a/wince/splittree.pl b/wince/splittree.pl
new file mode 100644
index 0000000000..3c76daadb1
--- /dev/null
+++ b/wince/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];