summaryrefslogtreecommitdiff
path: root/scripts/sort_package_license_list.pl
blob: cd20b50c926df35f849d8b752dfab89c7a36486b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/perl

use strict;
use warnings;

open (FH, $ARGV[0]);
my @list;

while (my $line = <FH>){
    chomp $line;
    push (@list,$line);
}

@list = sort { ($b =~ tr /\//\//) <=> ($a =~ tr /\//\//) || $b cmp $a } @list;

foreach my $line(@list){
    print "$line\n";
}