diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-08-14 14:18:07 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-08-14 18:35:01 +0100 |
commit | 87b18ec0382a4191a65e935d55c9ac4543a3d376 (patch) | |
tree | acb1929581e41f296ad15a2353c3205aa9fd05be | |
parent | 94f6f3e79813b9ced5dc495eeea248d238fbc7fc (diff) |
Convert to defvalopt: --initiator-tempdir
-rwxr-xr-x | dgit | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -3126,6 +3126,13 @@ defvalopt '--since-version', '-v', '[^_]+|_', \$changes_since_version; defvalopt '--distro', '-d', '.+', \$idistro; defvalopt '--existing-package','', '.*', \$existing_package; +defvalopt '--initiator-tempdir','','.*', sub { + ($initiator_tempdir) = (@_); + $initiator_tempdir =~ m#^/# or + badusage "--initiator-tempdir must be used specify an". + " absolute, not relative, directory." +}; + sub parseopts () { my $om; @@ -3187,11 +3194,6 @@ sub parseopts () { ($om = $opts_opt_map{$1})) { push @ropts, $_; push @$om, $2; - } elsif (m/^--initiator-tempdir=(.*)/s) { - $initiator_tempdir = $1; - $initiator_tempdir =~ m#^/# or - badusage "--initiator-tempdir must be used specify an". - " absolute, not relative, directory." } elsif (m/^--build-products-dir=(.*)/s) { push @ropts, $_; $buildproductsdir = $1; |