X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/5819d6b14a100850a75209901e2a4e01265998ed..4f3797c7e261a7acc83d35bb930d271f19d63be3:/packaging/nightly-rsync diff --git a/packaging/nightly-rsync b/packaging/nightly-rsync index c88fd697..7b21f3df 100755 --- a/packaging/nightly-rsync +++ b/packaging/nightly-rsync @@ -96,11 +96,23 @@ foreach my $fn (qw( rsync.yo rsyncd.conf.yo )) { unlink($fn); } -system "find . -name 'rsync-HEAD-*' -daystart -mtime +14 | xargs rm -f"; +my $cnt = 0; +open(PIPE, '-|', 'ls -1t rsync-HEAD-*') or die $!; +while () { + chomp; + next if $cnt++ < 10; + unlink($_); +} +close PIPE; + system 'ls -ltr'; if ($upload) { - system "rsync -aviHP --delete-after . samba.org:/home/ftp/pub/rsync/nightly"; + my $opt = ''; + if (defined $ENV{RSYNC_PARTIAL_DIR}) { + $opt = " -f 'R $ENV{RSYNC_PARTIAL_DIR}'"; + } + system "rsync$opt -aviHP --delete-after . samba.org:/home/ftp/pub/rsync/nightly"; } exit;