0001
0002
0003
0004
0005
0006
0007
0008
0009 use strict;
0010 use warnings;
0011
0012 my @files = glob("*.txt");
0013
0014 my $outfile="../doc/third_party_licences.adoc";
0015
0016
0017 open (FILE, "> $outfile") || die "problem opening $outfile\n";
0018
0019
0020 print FILE <<EOS;
0021 Third party library licenses used by Enduro/X
0022 =============================================
0023
0024 :sectnums:
0025 :chapter-label:
0026 :doctype: book
0027
0028 EOS
0029
0030
0031
0032
0033 foreach my $file (@files)
0034 {
0035
0036
0037
0038
0039
0040
0041 my ($module, $ltype) = ($file=~);
0042 $module =~ s/_/ /g;
0043
0044
0045
0046 $ltype = lc $ltype;
0047 $ltype = ucfirst $ltype;
0048
0049
0050
0051
0052 print FILE "== $ltype for \"$module\" library\n\n";
0053
0054 print FILE "--------------------------------------------------------------------------------\n\n";
0055 open(READH, '<', $file)
0056 or die "Could not open file '$file' $!";
0057
0058 while (my $row = <READH>)
0059 {
0060 chomp $row;
0061 chop($row) if ($row =~ );
0062 print FILE "$row\n";
0063 }
0064
0065 print FILE "\n";
0066
0067 close(READH);
0068
0069 print FILE "\n--------------------------------------------------------------------------------\n\n";
0070
0071 }
0072
0073 close(FILE);
0074
0075 exit 0;