File: kde.postinst

package info (click to toggle)
localization-config 1.07
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 672 kB
  • ctags: 44
  • sloc: perl: 3,174; sh: 67; makefile: 38
file content (41 lines) | stat: -rwxr-xr-x 1,102 bytes parent folder | download | duplicates (3)
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
40
41
#!/usr/bin/perl
# The wrapper script for KDE (post-install)

use strict;
use warnings;
use Getopt::Long;

# We use methods in common.pl
require '/usr/lib/localization-config/common/common.pl';
require '/usr/lib/localization-config/common/log.pl';

# The path where the scripts are kept
my $LIB = '/usr/lib/localization-config';

# call init() to initialize the APT config system
init();

# Define the version map for kdebase
my %vermap = ( '2.2.2-14.7',     => { RELEASE => 'woody' },
               '4:3.2.2-1',      => { RELEASE => 'sarge' },
               '3.5.5a.dfsg.1-6',=> { RELEASE => 'etch' },
               '4:3.5.9.dfsg.1-5',=> { RELEASE => 'lenny' },
              );

# Get lang entry
my $lang = $ARGV[0] or log_die("$0: No language given");

my $script = "kde";
my $package = "kdebase";

if (is_installed($package)) {
    # Get appropriate release for this package
    my $release = get_release($package, %vermap);

    # Execute the corresponding script
    $script = "$LIB/$release/".$script;
    log_msg("$0: Running $script $lang");
    system ($script, $lang) if -x $script;
}

1;