Skip to content

Commit

Permalink
Support concatenation of multiple modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Sep 27, 2021
1 parent e179006 commit 23fc515
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions writemodulemd
Expand Up @@ -169,20 +169,24 @@ if (@ARGV && $ARGV[0] eq '--filter') {

if (@ARGV && $ARGV[0] eq '--convert') {
shift @ARGV;
die("usage: writemodulemd --convert <modulemdfile>\n") unless @ARGV == 1;
my ($modulemdfile) = @ARGV;
my $mds = readmds($modulemdfile);
printmd($_) for @$mds;
die("usage: writemodulemd --convert <modulemdfile>\n") unless @ARGV;
my @mds;
for my $modulemdfile (@ARGV) {
push @mds, @{readmds($modulemdfile)};
}
printmd($_) for @mds;
exit;
}

if (@ARGV && $ARGV[0] eq '--converttopst') {
shift @ARGV;
die("usage: writemodulemd --converttopst <modulemdfile>\n") unless @ARGV == 1;
my ($modulemdfile) = @ARGV;
my $mds = readmds($modulemdfile);
die("usage: writemodulemd --converttopst <modulemdfile>\n") unless @ARGV;
my @mds;
for my $modulemdfile (@ARGV) {
push @mds, @{readmds($modulemdfile)};
}
require Storable;
Storable::nstore_fd($mds, \*STDOUT);
Storable::nstore_fd(\@mds, \*STDOUT);
exit
}

Expand Down

0 comments on commit 23fc515

Please sign in to comment.