Updated striker-parse-os-list to now take '--all' and '--xml' to show the list of OSes available to optmize VMs for in a simple machine-parsable format or XML, and to show only the OSes not in the words file yet, or all OSes.
# Read switches (target ([user@]host[:port]) and the file with the target's password.
$anvil->data->{switches}{new} = 0;
$anvil->data->{switches}{xml} = 0;
$anvil->Get->switches;
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, key => "log_0115", variables => { program => $THIS_FILE }});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => {
'switches::new' => $anvil->data->{switches}{new},
'switches::xml' => $anvil->data->{switches}{xml},
}});
my $words_file = $anvil->data->{path}{words}{'words.xml'};
my $language = $anvil->Words->language;
@ -50,10 +56,26 @@ foreach my $line (split/\n/, $output)
}});
my $os_key = "os_list_".$os_code;
if ((not exists $anvil->data->{words}{$words_file}{language}{$language}{key}{$os_key}) or (not $anvil->data->{words}{$words_file}{language}{$language}{key}{$os_key}{content}))
if ($anvil->data->{switches}{new})
{
# --xml only makes sense with '--new'. Without --new, we're comparing against the
if ((not exists $anvil->data->{words}{$words_file}{language}{$language}{key}{$os_key}) or (not $anvil->data->{words}{$words_file}{language}{$language}{key}{$os_key}{content}))