From c423da391b9e85f0f75063b73f93330dfffa2e11 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 9 Apr 2024 15:59:15 -0400 Subject: soxdial: fix --output option, tighten up option processing in general. --- soxdial | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'soxdial') diff --git a/soxdial b/soxdial index d1e58f1..b5837ea 100755 --- a/soxdial +++ b/soxdial @@ -458,15 +458,15 @@ if(!@ARGV) { # preprocess @ARGV, convert e.g. -b16 to -b 16, --foo=bar to --foo bar. @newargv = (); for(@ARGV) { - if(/^(--?\w+)=(\S+)$/) { + if(/^(--?\w+)=(.+)$/) { push @newargv, $1, $2; - } elsif(/^(--?[blcdts])(\d+(?:ms)?)/i) { + } elsif(/^(--?[blcdts])([\d.]+(?:ms)?)$/i) { push @newargv, $1, $2; - } elsif(/^(--?[r])(\d+(?:k)?)/i) { + } elsif(/^(--?[r])(\d+(?:k)?)$/i) { push @newargv, $1, $2; - } elsif(/^(--?[D])(\w\w)/i) { + } elsif(/^(--?[D])(\w\w)$/i) { push @newargv, $1, $2; - } elsif(/^(--?o)(\S+)/) { + } elsif(/^(--?o)(.+)$/) { if($2 eq 'utput') { push @newargv, $_; } else { @@ -492,12 +492,12 @@ for ($argc = 0; $argc < @ARGV; $argc++) { } elsif(/^--?(?:\?|h)/) { exec "perldoc $0"; exit 1; - } elsif(/^--?v(erbose)?$/) { + } elsif(/^--?v(?:erbose)?$/) { $verbose = 1; - } elsif(/^--?n(oexec)?$/) { + } elsif(/^--?n(?:oexec)?$/) { $verbose = 1; $noexec = 1; - } elsif(/^--?o(?:output)?$/) { + } elsif(/^--?o(?:utput)?$/) { $output = $ARGV[++$argc]; die "$SELF: missing argument for --output.\n" unless defined $output; warn "$SELF: output set to '$output'\n" if $verbose; -- cgit v1.2.3