Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 18 lines (15 sloc) 425 Bytes
#!/usr/bin/perl
# List packages that includes fonts
use strict;
use File::LsColor qw(ls_color);
my %font_pkgs;
open(my $pacman, '-|', 'pacman -Ql') or die($!);
while(<$pacman>) {
push(@{$font_pkgs{$1}}, $2) if($_ =~ /(.*)?\s+(.*font.*)/) and(! -d $2);
}
for my $pkg(sort(keys(%font_pkgs))) {
printf("\t\e[31;1m%s\e[0m => [\n", $pkg);
for my $font(@{$font_pkgs{$pkg}}) {
print "\t\t", ls_color($font), "\n";
}
}