diff options
| author | fukachan <fukachan> | 2003-12-26 14:51:37 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-12-26 14:51:37 +0000 |
| commit | 1cbfe02ae70634d240757dd079cef55cf735eaf6 (patch) | |
| tree | 9474aea045aa1413ca391166d1a6c66dd09f1f92 | |
| parent | b3ba8ed79df9c39d95c7399b690abfa0b4db73b1 (diff) | |
| download | fml8-1cbfe02ae70634d240757dd079cef55cf735eaf6.tar.gz fml8-1cbfe02ae70634d240757dd079cef55cf735eaf6.tar.bz2 fml8-1cbfe02ae70634d240757dd079cef55cf735eaf6.zip | |
workaround: bug fix installation of default_config.cf et.al
(PR by fml-devel 643).
| -rw-r--r-- | fml/etc/install.cf.in | 6 | ||||
| -rw-r--r-- | fml/lib/FML/Install.pm | 11 |
2 files changed, 15 insertions, 2 deletions
diff --git a/fml/etc/install.cf.in b/fml/etc/install.cf.in index 1d4895c6..80bc0a5c 100644 --- a/fml/etc/install.cf.in +++ b/fml/etc/install.cf.in @@ -3,7 +3,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: install.cf.in,v 1.13 2003/12/21 14:39:04 fukachan Exp $ +# $FML: install.cf.in,v 1.14 2003/12/24 12:49:10 fukachan Exp $ # @@ -66,6 +66,10 @@ nl_template_files = default_config.cf.ja config.cf.ja config.cf.en +# ln -s default_config.cf.$nl_default_language default_config.cf +nl_default_language = ja + + # sample files sample_cf_files = site_default_config.cf mime_component_filter diff --git a/fml/lib/FML/Install.pm b/fml/lib/FML/Install.pm index edd27a70..08eb39d7 100644 --- a/fml/lib/FML/Install.pm +++ b/fml/lib/FML/Install.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Install.pm,v 1.8 2003/10/26 02:04:08 fukachan Exp $ +# $FML: Install.pm,v 1.9 2003/12/21 14:39:05 fukachan Exp $ # package FML::Install; @@ -292,6 +292,7 @@ sub install_default_config_files # XXX change file name of components of $nl_template_files into # XXX ${file_name}.{ja,en,...} my $nl_template_files = $config->get_as_array_ref('nl_template_files'); + my $nl_language = $config->{ nl_default_language } || 'en'; for my $file (@$nl_template_files) { # XXX src = relative path, dst = absolute path my $src = File::Spec->catfile("fml", "etc", $file); @@ -299,6 +300,14 @@ sub install_default_config_files # always override. $self->convert($src, $dst, 0644); + + # always override. + # XXX we need install default_config.cf too! (caution: mandatory) + if ($dst =~ /\.$nl_language$/) { + my $xxx = $dst; + $xxx =~ s/\.$nl_language$//; + $self->convert($src, $xxx, 0644); + } } my $template_files = $config->get_as_array_ref('template_files'); |
