chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
867ac17
)
do not update LICENCE if not needed (saves on rebuilding)
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 26 Sep 2020 18:36:09 +0000
(19:36 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 26 Sep 2020 18:36:09 +0000
(19:36 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
media-scraper
patch
|
blob
|
history
diff --git
a/media-scraper
b/media-scraper
index 2d8fcfe39d5ffac044b6af8ad566412793b896c0..da73cbc7ff47dd8b21862166fdac9853890c6e12 100755
(executable)
--- a/
media-scraper
+++ b/
media-scraper
@@
-12,6
+12,7
@@
use TOML::Parser;
use Data::Dumper;
use Time::HiRes;
use Digest::MD5 qw(md5_hex);
+use File::Compare;
our $max_rate = 2; # per second
@@
-200,5
+201,12
@@
END
}
close $makefile or die $!;
-rename "$licpath.tmp", $licpath or die $!;
+
+my $cmp = compare("$licpath.tmp", $licpath);
+die if $cmp < 0;
+if ($cmp) {
+ rename "$licpath.tmp", $licpath or die $!;
+} else {
+ remove "$licpath.tmp";
+}
rename "$makepath.tmp", $makepath or die $!;