From 5586bde15ca4b023816f37b53c6d173c1ab50b7b Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 21 Mar 2013 12:20:11 +0100 Subject: scripts/check-{near-bragg,peak-detection}: Improve option processing --- scripts/check-peak-detection | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts/check-peak-detection') diff --git a/scripts/check-peak-detection b/scripts/check-peak-detection index e55bfdf8..7d9b6660 100755 --- a/scripts/check-peak-detection +++ b/scripts/check-peak-detection @@ -5,19 +5,23 @@ use File::Basename; my $only; my $file; +my $start; # Horrible option processing if ( $ARGV[0] eq "--indexed" ) { $only = "indexed"; $file = $ARGV[1]; + $start = 2; } elsif ( $ARGV[0] eq "--not-indexed" ) { $only = "notindexed"; $file = $ARGV[1]; + $start = 2; } else { $only = ""; $file = $ARGV[0]; + $start = 1; } -my $args = join(" ", splice(@ARGV, 2, scalar(@ARGV)-1)); +my $args = join(" ", splice(@ARGV, $start, scalar(@ARGV)-1)); if ( !($args eq "") ) { printf("Extra arguments for hdfsee: %s\n", $args); } else { -- cgit v1.2.3