/[BackupPC]/trunk/bin/BackupPC_incPartsUpdate
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/BackupPC_incPartsUpdate

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 214 by dpavlin, Sun Oct 16 12:33:05 2005 UTC revision 215 by dpavlin, Sun Oct 16 16:18:12 2005 UTC
# Line 13  use POSIX qw/strftime/; Line 13  use POSIX qw/strftime/;
13  use BackupPC::SearchLib;  use BackupPC::SearchLib;
14  use Cwd qw/abs_path/;  use Cwd qw/abs_path/;
15  use File::Which;  use File::Which;
16  use Archive::Tar;  use Archive::Tar::Streamed;
17  use Algorithm::Diff;  use Algorithm::Diff;
18  use Getopt::Std;  use Getopt::Std;
19    
# Line 95  sub tar_check($$$$) { Line 95  sub tar_check($$$$) {
95                  tar_join($filename);                  tar_join($filename);
96          }          }
97    
         my $tar = Archive::Tar->new;  
         my $comp = 0;  
         $comp = 1 if ($filename =~ m/\.(gz|tgz)$/);  
98          print STDERR ", opening" if ($debug);          print STDERR ", opening" if ($debug);
99          $tar->read($filename, $comp) or die "can't open $filename: $!";          open(my $fh, "gzip -cd $filename |") or die "can't open $filename: $!";
100            binmode($fh);
101            my $tar = Archive::Tar::Streamed->new($fh);
102    
103          print STDERR ", tar" if ($debug);          print STDERR ", tar" if ($debug);
104          my @tar_files = sort $tar->list_files();          my @tar_files;
105            while(my $entry = $tar->next) {
106                    push @tar_files, $entry->name;
107            }
108            @tar_files = sort @tar_files;
109          print STDERR " ",($#tar_files + 1), " files" if ($debug);          print STDERR " ",($#tar_files + 1), " files" if ($debug);
110    
111          print STDERR ", database" if ($debug);          print STDERR ", database" if ($debug);

Legend:
Removed from v.214  
changed lines
  Added in v.215

  ViewVC Help
Powered by ViewVC 1.1.26