summaryrefslogtreecommitdiffstats
path: root/tools/live-lang
blob: 6772648417b8dd7de2b6769c4814acee8166739c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/perl 
#
#

use strict;
use lib qw(/usr/lib/libDrakX);
use common;
use lang;

my @chroot = @ARGV;

@chroot or usage();

foreach my $path (@chroot) {
    my %done;
    my $qa = `chroot $path rpm -qa`;
    my @list;
    foreach my $rpm (split "\n", $qa) {
	my $l;
	if ($rpm =~ /locales-([^-]+)-/) {
		#$l = $1	
	} elsif ($rpm =~ /(?:i18n|l10n|aspell)-([^-]+)-/) {
	    $l = $1
	}
	if ($l && $lang::langs{$l} && !$done{$l}) {
	    $done{$l} = 1;
	    push @list,@{$lang::langs{$l}}[0]
	}
    }
    print "$path: ", join(", ", sort @list), "\n"
}

exit;

sub usage {
    print "\nusage:\n\n\t\tlive-lang <chroot install>\n\n";
    exit
}