summaryrefslogtreecommitdiff
path: root/multimedia/mplayerxp/files/install-user
blob: 8f0dda4a6adf0b29c0c15edafdb2f35d3814575b (plain) (blame)
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
#This perl script links the codec config file
#and the fonts dir to the user's home dir.

if (-e "$ENV{HOME}/.mplayer/")
{
	print "Sorry, you should execute this target without having a .mplayer directory in your homedir.\n";
	exit 1;
}

#Determining location of fonts:

@pkg=`pkg_info -Lx mplayer-fonts`;
print "$prefix[3]";
$prefix=$pkg[3];
$prefix=~ s/(.+mplayer).*/$1/;
chop $prefix;

print "You may choose any of the available language sets:\n\n";
print "European fonts (e.g. dutch, french, german...) : e\n";
print "Cyrillic fonts : c\n";
print "Russian fonts: r\n";

print "Your decision? ";
chomp ($lang=<STDIN>);
print "\n";

system "mkdir $ENV{HOME}/.mplayer";
if ($lang eq "c")
{
	system "ln -s $prefix/fonts/cyrillic/ $ENV{HOME}/.mplayer/font";
}
elsif ($lang eq "r")
{
	system "ln -s $prefix/fonts/koi8r/ $ENV{HOME}/.mplayer/font";
}
else {system "ln -s $prefix/fonts/iso/ $ENV{HOME}/.mplayer/font"};

system "ln -s $prefix/codecs.conf $ENV{HOME}/.mplayer/codecs.conf";