Skip to content

Commit

Permalink
New files can have configurable btime
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Steinert committed Mar 16, 2009
1 parent 196d626 commit 01a8b11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cd-backup
Expand Up @@ -23,7 +23,7 @@ my $smam = `tput smam`;

my $media_size = shift @ARGV;
my $backup_name = shift @ARGV;
my @backup_basenames = map { [ split( /(?<!\\)=/, $_, 2 ) ] } @ARGV;
my @backup_basenames = map { [ split(/(?<!\\)=/, $_) ] } @ARGV;

# DEFINE A FEW CONSTANTS
BEGIN {
Expand Down Expand Up @@ -117,6 +117,8 @@ print STDERR "$civis$rmam";
foreach my $backup_basename (@backup_basenames) {
debug_out( "Starting $backup_basename->[0] ($backup_basename->[1])\n" ) if DEBUG;

my $newfile_time = $backup_basename->[2] || 0;

my @prune;

my $preprocess = sub {
Expand Down Expand Up @@ -182,7 +184,7 @@ foreach my $backup_basename (@backup_basenames) {
}
else {
debug_out( " New File " ) if DEBUG;
push @stat, 0;
push @stat, $newfile_time;
}

if ($stat[MTIME] > $last_run_time) {
Expand Down

0 comments on commit 01a8b11

Please sign in to comment.