Move main part to the bottom, it's getting extended.

This commit is contained in:
Cyril Brulebois 2021-07-25 08:01:39 +02:00
parent dae7be7662
commit c9f7df2963
1 changed files with 17 additions and 10 deletions

View File

@ -34,16 +34,6 @@ GetOptions( "output-dir=s" => \$output_dir,
"verbose" => \$verbose )
or die "Error in command line arguments";
if (! -d $output_dir) {
print STDERR "creating output directory $output_dir\n"
if $verbose;
make_path($output_dir, { verbose => $verbose });
}
write_file("$output_dir/README.txt",
"These files help Debian Installer detect helpful firmware packages (via hw-detect).\n");
process_components($_) for @ARGV;
sub process_components {
my $input = shift;
@ -86,3 +76,20 @@ sub process_components {
@{ $array->{Provides}->{modaliases} });
}
}
# Prepare output directory:
if (! -d $output_dir) {
print STDERR "creating output directory $output_dir\n"
if $verbose;
make_path($output_dir, { verbose => $verbose });
}
write_file("$output_dir/README.txt",
"These files help Debian Installer detect helpful firmware packages (via hw-detect).\n");
# Generate a .patterns file for each firmware package found in
# Components-* files:
foreach my $component (@ARGV) {
process_components($component);
}