chiark / gitweb /
dgit: Provide $bpd_glob
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 25 Jul 2018 09:01:28 +0000 (10:01 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 25 Jul 2018 09:16:16 +0000 (10:16 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
dgit

diff --git a/dgit b/dgit
index adf125a..2ba3aae 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -64,6 +64,7 @@ our $sign = 1;
 our $dryrun_level = 0;
 our $changesfile;
 our $buildproductsdir;
+our $bpd_glob;
 our $new_package = 0;
 our $ignoredirty = 0;
 our $rmonerror = 1;
@@ -7067,6 +7068,8 @@ sub parseopts_late_defaults () {
 
     $buildproductsdir //= access_cfg('build-products-dir', 'RETURN-UNDEF');
     $buildproductsdir //= '..';
+    $bpd_glob = $buildproductsdir;
+    $bpd_glob =~ s#[][\\{}*?~]#\\$&#g;
 }
 
 if ($ENV{$fakeeditorenv}) {