From fc8a490c9eda9c4c16303362d1d0b20fb54b22ec Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 23 Jul 2018 12:10:02 +0800 Subject: dgit: add dgit.default.build-products-dir git configuration key Signed-off-by: Sean Whitton Signed-off-by: Ian Jackson --- dgit | 5 ++++- dgit.1 | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/dgit b/dgit index 0c55655..adf125a 100755 --- a/dgit +++ b/dgit @@ -63,7 +63,7 @@ our @ropts; our $sign = 1; our $dryrun_level = 0; our $changesfile; -our $buildproductsdir = '..'; +our $buildproductsdir; our $new_package = 0; our $ignoredirty = 0; our $rmonerror = 1; @@ -7064,6 +7064,9 @@ sub parseopts_late_defaults () { badcfg "unknown clean-mode \`$cleanmode'" unless $cleanmode =~ m/^($cleanmode_re)$(?!\n)/s; } + + $buildproductsdir //= access_cfg('build-products-dir', 'RETURN-UNDEF'); + $buildproductsdir //= '..'; } if ($ENV{$fakeeditorenv}) { diff --git a/dgit.1 b/dgit.1 index 1460938..ddb0c0a 100644 --- a/dgit.1 +++ b/dgit.1 @@ -842,6 +842,11 @@ regardless of this option. Specifies where to find the built files to be uploaded. By default, dgit looks in the parent directory .RB ( .. ). + +Also see the +.BI dgit.default.build-products-dir +configuration option +(which this command line option overrides). .TP .BI --no-rm-on-error Do not delete the destination directory if clone fails. @@ -1096,6 +1101,12 @@ on the dgit command line. .LP Settings likely to be useful for an end user include: .TP +.BI dgit.default.build-products-dir +Specifies where to find the built files to be uploaded, +when --build-products-dir is not specified. The default is +the parent directory +.RB ( .. ). +.TP .BR dgit-suite. \fIsuite\fR .distro " \fIdistro\fR" Specifies the distro for a suite. dgit keys off the suite name (which appears in changelogs etc.), and uses that to determine the distro -- cgit v1.2.3