summaryrefslogtreecommitdiffstats
path: root/trunk/tools/live-lang
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/tools/live-lang')
-rw-r--r--trunk/tools/live-lang39
1 files changed, 39 insertions, 0 deletions
diff --git a/trunk/tools/live-lang b/trunk/tools/live-lang
new file mode 100644
index 0000000..6772648
--- /dev/null
+++ b/trunk/tools/live-lang
@@ -0,0 +1,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
+}
+