diff options
author | elliott_c <ocielliottc@users.noreply.github.com> | 2004-07-15 19:02:22 +0000 |
---|---|---|
committer | elliott_c <ocielliottc@users.noreply.github.com> | 2004-07-15 19:02:22 +0000 |
commit | bcb07d85cd9b6bd8fbee8d56371d504c347ad074 (patch) | |
tree | 5ceae5230dd0035519a7ad95fe4ab6f441a929eb /clone_build_tree.pl | |
parent | 6a40e19f3cce332dff5e49648a610af5490aa5f9 (diff) | |
download | MPC-bcb07d85cd9b6bd8fbee8d56371d504c347ad074.tar.gz |
ChangeLogTag: Thu Jul 15 14:02:04 2004 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'clone_build_tree.pl')
-rwxr-xr-x | clone_build_tree.pl | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/clone_build_tree.pl b/clone_build_tree.pl index 52507fd6..abbc5f58 100755 --- a/clone_build_tree.pl +++ b/clone_build_tree.pl @@ -32,7 +32,7 @@ use File::Basename; # Data Section # ****************************************************************** -my($version) = '0.1'; +my($version) = '0.2'; my($exclude) = undef; my($verbose) = 0; my(@foundFiles) = (); @@ -100,10 +100,9 @@ sub findCallback { ); if ($matches) { - ## Remove the beginning dot slash and save the file - my($file) = $File::Find::name; - $file =~ s/^\.[\\\/]+//; - push(@foundFiles, $file); + ## Remove the beginning dot slash as we save the file + push(@foundFiles, $File::Find::name); + $foundFiles[$#foundFiles] =~ s/^\.[\\\/]+//; } } } @@ -310,7 +309,7 @@ sub hardlinkFiles { ## Remove links that point to non-existant files my($lfh) = new FileHandle(); my($txt) = "$fullbuild/clone_build_tree.links"; - if (open($lfh, "$txt")) { + if (open($lfh, $txt)) { while(<$lfh>) { my($line) = $_; $line =~ s/\s+$//; @@ -356,7 +355,9 @@ sub linkFiles { ## Search for the clonable files print "Searching $startdir for files...\n"; my($files) = getFileList(); - print "Found $#foundFiles files and directories.\n"; + my($findtime) = time() - $starttime; + print 'Found ', scalar(@$files), ' files and directories in ', + $findtime, ' second', ($findtime == 1 ? '' : 's'), ".\n"; foreach my $build (@$builds) { my($fullbuild) = "$builddir/$build"; @@ -375,7 +376,7 @@ sub linkFiles { } if ($status == 0) { - print "Total time: ", time() - $starttime, " seconds.\n"; + print 'Total time: ', time() - $starttime, " seconds.\n"; } return $status; @@ -480,7 +481,7 @@ else { if (!defined $builds[0]) { my($cwd) = getcwd(); if (chdir($builddir)) { - @builds = glob("*"); + @builds = glob('*'); chdir($cwd); } else { |