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 621288b..2434f6a 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';