File: make-template.pl

package info (click to toggle)
console-data 2002.12.04dbs-49
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,024 kB
  • ctags: 26
  • sloc: perl: 1,663; makefile: 110; sh: 61
file content (20 lines) | stat: -rwxr-xr-x 348 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl


open (MAPLIST, $ARGV[0]) || die "Failed to open $ARGV[0]\n";

print "Template: $ARGV[0]/keymap\n";
print "Type: select\n";

$keymaps = "";

while (<MAPLIST>) {
	($langs,$name,$english) = split ;
	if ($keymaps eq "") { 
		$keymaps = $name;
	} else {
		$keymaps = join (',', $keymaps, $name);
	}		
}

print "__Choices: $keymaps\n";