|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [OSSTEST PATCH 1/3] mg-hosts mknetbootdir: Improve sub-option parser
No semantic change.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
mg-hosts | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/mg-hosts b/mg-hosts
index 58b4acc3..d68f7b4e 100755
--- a/mg-hosts
+++ b/mg-hosts
@@ -121,7 +121,14 @@ sub l ($) { return split /,/, $_[0]; }
sub cmd_mknetbootdir () {
my $dryrun = 0;
- if (@ARGV && $ARGV[0] eq '-n') { shift @ARGV; $dryrun= 1; }
+ while (@ARGV && $ARGV[0] =~ m/^-/) {
+ $_ = shift @ARGV;
+ last if $_ =~ m/^--?$/;
+ while (m/^-./) {
+ if (s/^-n/-/) { $dryrun= 1; }
+ else { die "unknown mknetbootdir option $_"; }
+ }
+ }
die unless @ARGV>=1;
my $sudo = $ENV{'OSSTEST_SUDO'} // 'sudo';
foreach my $hn (@ARGV) {
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |