Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f41152d
)
Changed the code that cleans up the old nightly releases from
author
Wayne Davison
<wayned@samba.org>
Thu, 8 Mar 2007 02:00:48 +0000
(
02:00
+0000)
committer
Wayne Davison
<wayned@samba.org>
Thu, 8 Mar 2007 02:00:48 +0000
(
02:00
+0000)
time-based to count-based (keeping the newest 10 items).
packaging/nightly-rsync
patch
|
blob
|
blame
|
history
diff --git
a/packaging/nightly-rsync
b/packaging/nightly-rsync
index
b526f5d
..
7b21f3d
100755
(executable)
--- a/
packaging/nightly-rsync
+++ b/
packaging/nightly-rsync
@@
-96,7
+96,15
@@
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 (<PIPE>) {
+ chomp;
+ next if $cnt++ < 10;
+ unlink($_);
+}
+close PIPE;
+
system 'ls -ltr';
if ($upload) {