chiark / gitweb /
Convert to defvalopt: --clean
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 14 Aug 2015 13:21:31 +0000 (14:21 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 14 Aug 2015 17:35:02 +0000 (18:35 +0100)
dgit

diff --git a/dgit b/dgit
index 5baa5b5..b06e078 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3126,6 +3126,7 @@ defvalopt '--since-version', '-v', '[^_]+|_', \$changes_since_version;
 defvalopt '--distro',        '-d', '.+',      \$idistro;
 defvalopt '--existing-package','', '.*',      \$existing_package;
 defvalopt '--build-products-dir','','.*',     \$buildproductsdir;
+defvalopt '--clean',       '', $cleanmode_re, \$cleanmode;
 
 defvalopt '--initiator-tempdir','','.*', sub {
     ($initiator_tempdir) = (@_);
@@ -3195,11 +3196,6 @@ sub parseopts () {
                     ($om = $opts_opt_map{$1})) {
                push @ropts, $_;
                push @$om, $2;
-           } elsif (m/^--clean=($cleanmode_re)$/os) {
-               push @ropts, $_;
-               $cleanmode = $1;
-           } elsif (m/^--clean=(.*)$/s) {
-               badusage "unknown cleaning mode \`$1'";
            } elsif (m/^--quilt=($quilt_modes_re)$/s) {
                push @ropts, $_;
                $quilt_mode = $1;