diff options
author | Joey Hess <joey@kitenet.net> | 2009-08-26 17:12:34 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2009-08-26 17:12:34 -0400 |
commit | 1089dbaaa1ccc4b7bade09555e67ae126bf776f2 (patch) | |
tree | 5760bcdf6417af4dc89769b0d690935ffa20c753 /dh | |
parent | dc140665f3ae022f682a43c044c18c0fa0d0e5be (diff) | |
parent | 055eb0b4ef0efee17b1328fbbf012af4110968d4 (diff) |
Merge branch 'master' of ssh://git.debian.org/git/debhelper/debhelper
Diffstat (limited to 'dh')
-rwxr-xr-x | dh | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -293,6 +293,9 @@ $sequences{binary} = [@{$sequences{install}}, qw{ }, @b]; $sequences{'binary-arch'} = [@{$sequences{binary}}]; +# Additional command options +my %command_opts; + # sequence addon interface sub _insert { my $offset=shift; @@ -333,6 +336,26 @@ sub add_command { my $sequence=shift; unshift @{$sequences{$sequence}}, $command; } +sub add_command_options { + my $command=shift; + push @{$command_opts{$command}}, @_; +} +sub remove_command_options { + my $command=shift; + if (@_) { + # Remove only specified options + if (my $opts = $command_opts{$command}) { + foreach my $opt (@_) { + $opts = [ grep { $_ ne $opt } @$opts ]; + } + $command_opts{$command} = $opts; + } + } + else { + # Clear all additional options + delete $command_opts{$command}; + } +} if ($dh{LIST}) { my %addons; @@ -501,6 +524,10 @@ sub run { $command="debian/rules"; @options="override_".$override_command; } + else { + # Pass additional command options if any + unshift @options, @{$command_opts{$command}} if exists $command_opts{$command}; + } # 3 space indent lines the command being run up under the # sequence name after "dh ". |