summaryrefslogtreecommitdiffstats
path: root/perl-install/share/keymaps_generate
blob: 29fd576fb7fcc9dd0d4d01b355ed46af98704097 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/perl

use lib "..";
use keyboard;

system("rm -rf keymaps ; mkdir keymaps");

foreach (keyboard::xmodmaps()) {
    my $kmap = keyboard::keyboard2kmap($_);
    if (system("./kmap2bkmap $kmap > keymaps/$kmap.bkmap 2>/dev/null") != 0) {
	warn "unknown kmap $kmap\n";
	unlink "keymaps/$kmap.bkmap";
    }
}

system("tar cfI keymaps.tar.bz2 keymaps") == 0 or die;
system("rm -rf keymaps");