commit 30dda1539035eb5528ce7555a418a030c634fc35 Author: Nicolas Vigier boklm@torproject.org Date: Tue Jun 16 19:43:04 2020 +0200
Bug 40001: Add the rbmdir config option --- doc/rbm_config.asc | 3 +++ lib/RBM.pm | 2 ++ 2 files changed, 5 insertions(+)
diff --git a/doc/rbm_config.asc b/doc/rbm_config.asc index 43feb9a..111b115 100644 --- a/doc/rbm_config.asc +++ b/doc/rbm_config.asc @@ -142,6 +142,9 @@ rbm_tmp_dir:: automatically when rbm exits. When running scripts, the TMPDIR environment variable is also set to this directory.
+rbmdir:: + The directory where the rbm script is located. + output_dir:: The directory where output files (tarballs, spec files or packages) are created. The default value is +out+. diff --git a/lib/RBM.pm b/lib/RBM.pm index f750e83..94f2e9d 100644 --- a/lib/RBM.pm +++ b/lib/RBM.pm @@ -21,6 +21,7 @@ use RBM::DefaultConfig; use Digest::SHA qw(sha256_hex); use Data::UUID; use Data::Dump qw(dd pp); +use FindBin; use feature "state";
@@ -54,6 +55,7 @@ sub load_config { $config = load_config_file($config_file); $config->{default} = %default_config; $config->{basedir} = dirname($config_file); + $config->{rbmdir} = $FindBin::Bin; $config->{step} = 'rbm_init'; $config->{opt} = {}; my $pdir = $config->{projects_dir} || $config->{default}{projects_dir};