about summary refs log tree commit diff
path: root/scripts/generate-patches.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/generate-patches.pl')
-rwxr-xr-xscripts/generate-patches.pl17
1 files changed, 10 insertions, 7 deletions
diff --git a/scripts/generate-patches.pl b/scripts/generate-patches.pl
index 4b91884d0af7..68d3f20db9a0 100755
--- a/scripts/generate-patches.pl
+++ b/scripts/generate-patches.pl
@@ -215,18 +215,21 @@ foreach my $p (keys %dstOutPaths) {
         my $finalName =
             "$narDiffHash-$name-$closestVersion-to-$version.nar-bsdiff";
 
+        print "    size $narDiffSize; full size $dstNarBz2Size\n";
+        
         if (-e "$patchesDir/$finalName") {
             print "    not copying, already exists\n";
-            next;
         }
 
-        print "    size $narDiffSize; full size $dstNarBz2Size\n";
-        
-        system("cp '$tmpdir/DIFF' '$patchesDir/$finalName.tmp'") == 0
-            or die "cannot copy diff";
+        else {
 
-        rename("$patchesDir/$finalName.tmp", "$patchesDir/$finalName")
-            or die "cannot rename $patchesDir/$finalName.tmp";
+            system("cp '$tmpdir/DIFF' '$patchesDir/$finalName.tmp'") == 0
+                or die "cannot copy diff";
+            
+            rename("$patchesDir/$finalName.tmp", "$patchesDir/$finalName")
+                or die "cannot rename $patchesDir/$finalName.tmp";
+            
+        }
         
         # Add the patch to the manifest.
         addPatch \%dstPatches, $p,