diff options
-rwxr-xr-x | soxdial | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -550,6 +550,19 @@ sub check_stereo { } # main() +for(@ARGV) { + if(/--?(?:V|version)$/) { + print "$SELF $VERSION\n"; + exit 0; + } elsif(/^--?man$/) { + exec "pod2man --stderr -s6 -cUrchlaysStuff -r$VERSION -u $0"; + exit 1; + } elsif(/^--?(?:\?|h)/) { + exec "perldoc $0"; + exit 1; + } +} + if(system("sox --version > /dev/null 2>&1") != 0) { die "$SELF: can't execute sox, is it installed?\n"; } @@ -589,16 +602,7 @@ for(@ARGV) { for ($argc = 0; $argc < @ARGV; $argc++) { $_ = $ARGV[$argc]; - if(/--?(?:V|version)$/) { - print "$SELF $VERSION\n"; - exit 0; - } elsif(/^--?man$/) { - exec "pod2man --stderr -s6 -cUrchlaysStuff -r$VERSION -u $0"; - exit 1; - } elsif(/^--?(?:\?|h)/) { - exec "perldoc $0"; - exit 1; - } elsif(/^--?v(?:erbose)?$/) { + if(/^--?v(?:erbose)?$/) { $verbose = 1; } elsif(/^--?n(?:oexec)?$/) { $verbose = 1; |