chiark / gitweb /
Refactor coping with maybe-existing files in fake dsc
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 20 Aug 2015 12:52:26 +0000 (13:52 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 20 Aug 2015 12:52:26 +0000 (13:52 +0100)
dgit

diff --git a/dgit b/dgit
index 621288b7184186f6c95607cb4727af83e9b742bd..2434f6a2fb5c2e23d67aa3cd6e02633449a11f9a 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -2808,8 +2808,9 @@ END
     }
 
     my @files=qw(debian/source/format debian/rules);
-    if (stat_exists '../../../debian/patches') {
-        push @files, 'debian/patches';
+    foreach my $maybe (qw(debian/patches)) {
+        next unless stat_exists "../../../$maybe";
+        push @files, $maybe;
     }
 
     my $debtar= srcfn $fakeversion,'.debian.tar.gz';