aboutsummaryrefslogtreecommitdiffstats
path: root/zh-tw/timeline
diff options
context:
space:
mode:
authorYuri Chornoivan <yurchor@ukr.net>2022-06-17 21:50:24 +0300
committerYuri Chornoivan <yurchor@ukr.net>2022-06-17 21:50:24 +0300
commite187c90930f288195e91823c68b383808a5832d5 (patch)
tree0a8cdc8347d797f0d3f704829454d2c3b9e6d033 /zh-tw/timeline
parentfa4895cc307bbd86eba36b48a5128108ac4f8acb (diff)
downloadwww-e187c90930f288195e91823c68b383808a5832d5.tar
www-e187c90930f288195e91823c68b383808a5832d5.tar.gz
www-e187c90930f288195e91823c68b383808a5832d5.tar.bz2
www-e187c90930f288195e91823c68b383808a5832d5.tar.xz
www-e187c90930f288195e91823c68b383808a5832d5.zip
Update Spanish translation
Diffstat (limited to 'zh-tw/timeline')
0 files changed, 0 insertions, 0 deletions
#n6'>6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#!/usr/bin/perl

use MDK::Common;

listlength(@ARGV) == 2 or die "usage: $0 /path/to/etc/pcmcia/config /path/to/modules.dep\n";

my ($pcmcia_config, $modules_dep) = @ARGV;


my @ignore_modules_in_deps = qw(pcmcia_core ds);

my @conf_contents = cat_($pcmcia_config);
die "uhm, problem, <$pcmcia_config> seems short in lines\n" if listlength(@conf_contents) < 10;

foreach (cat_($modules_dep)) {
    /^(\S+): (.*)/ and $deps{$1} = [ split ' ', $2 ] or die "could not understand `$_' in <$modules_dep>\n";
}

foreach my $confline (@conf_contents) {
    $confline =~ /class.*\s+module\s+(.*)/ or next;
    my @modules = map { /"([^"]+)"(.*)/ && [ $1, $2 ] } split ',', $1;
    $_->[0] =~ s|.*/([^/]+)$|$1|g foreach @modules;  #- remove directories since we don't support that during install
    my @deps = grep { !member($_, @ignore_modules_in_deps, map { $_->[0] } @modules) } map { @{$deps{$_->[0]}} } @modules;
    my $new_modz = join ', ', (map { "\"$_\"" } @deps), (map { "\"$_->[0]\"$_->[1]" } @modules);
    $confline =~ s/(class.*\s+module\s+).*/$1$new_modz/;
}

output($pcmcia_config, @conf_contents);