~ubuntu-branches/ubuntu/oneiric/localization-config/oneiric

« back to all changes in this revision

Viewing changes to conffiles.d/links.postinst

  • Committer: Bazaar Package Importer
  • Author(s): Konstantinos Margaritis
  • Date: 2004-12-10 19:10:18 UTC
  • Revision ID: james.westby@ubuntu.com-20041210191018-wdjfbljdie570dld
Tags: 0.109
* Translations
  - Added Finnish by Tapio Lehtonen. Closes: #281040
  - Fixed Spanish translation (was too long). Closes: #284570

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl
 
2
# The wrapper script for links (post-install)
 
3
 
 
4
use strict;
 
5
use warnings;
 
6
use Getopt::Long;
 
7
 
 
8
my $debug;
 
9
 
 
10
# Get command line options
 
11
GetOptions("debug" => \$debug);
 
12
 
 
13
# We use methods in common.pl
 
14
require '/usr/lib/localization-config/common/common.pl';
 
15
 
 
16
# The path where the scripts are kept
 
17
my $LIB = '/usr/lib/localization-config';
 
18
 
 
19
# call init() to initialize the APT config system
 
20
init();
 
21
 
 
22
# Define the version map for links
 
23
my %vermap = ( '0.96.20020409-2',          => { RELEASE => 'woody' },
 
24
               '0.99-1',                   => { RELEASE => 'sarge' }
 
25
              );
 
26
 
 
27
# Get locale entry
 
28
my $lang = shift;
 
29
 
 
30
my $script = "links";
 
31
my $package = "links";
 
32
 
 
33
if (is_installed($package)) {
 
34
    # Get appropriate release for this package
 
35
    my $release = get_release($package, %vermap);
 
36
 
 
37
    # Execute the corresponding script
 
38
    $script = "$LIB/$release/".$script;
 
39
    print "Running $script $lang\n" if $debug;
 
40
    system ($script, $lang) if -x $script;
 
41
}
 
42
 
 
43
1;