$> = $FEX[2];
$) = $FEX[3];
+umask 022;
+
$FEXHOME = $ENV{FEXHOME} || $FEX[7];
# require "$FEXHOME/lib/fex.pp"
print "$ft written\n";
}
-foreach $file (@cpfiles) {
- my $fs = "locale/$lang/$file";
- if (-e $fs) {
- my $fd = "$FEXHOME/$fs";
- mkdirp(dirname($fd));
- if (-f $fs) {
- $fd .= '_new' if -e $fd;
- if (copy($fs,$fd)) {
- chmod((stat $fs)[2],$fd);
- print "$fd written\n";
- }
- } else {
- if (-f $fd) {
- my $fds = $fd.'_save';
- my $fdn = $fd.'_new';
- system "rm -rf $fds $fdn";
- rename $fd,$fds;
- system "tar cf - $fs | (cd $FEXHOME; tar xf -)";
- rename $fd,$fdn;
- rename $fds,$fd;
- print "$fdn written\n";
+if ($FEXHOME !~ /fexdev/) {
+
+ foreach $file (@cpfiles) {
+ my $fs = "locale/$lang/$file";
+ if (-e $fs) {
+ my $fd = "$FEXHOME/$fs";
+ mkdirp(dirname($fd));
+ if (-f $fs) {
+ $fd .= '_new' if -e $fd;
+ if (copy($fs,$fd)) {
+ chmod((stat $fs)[2],$fd);
+ print "$fd written\n";
+ }
} else {
- system "tar cf - $fs | (cd $FEXHOME; tar xf -)";
- print "$fd written\n";
+ if (-f $fd) {
+ my $fds = $fd.'_save';
+ my $fdn = $fd.'_new';
+ system "rm -rf $fds $fdn";
+ rename $fd,$fds;
+ system "tar cf - $fs | (cd $FEXHOME; tar xf -)";
+ rename $fd,$fdn;
+ rename $fds,$fd;
+ print "$fdn written\n";
+ } else {
+ system "tar cf - $fs | (cd $FEXHOME; tar xf -)";
+ print "$fd written\n";
+ }
}
}
}
-}
-foreach $fs (qw(fex.ph dop)) {
- $fd = "$FEXHOME/locale/$lang/lib/$fs";
- symlink "../../../lib/$fs",$fd and print "$fd linked\n";
-}
+ foreach $fs (qw(fex.ph dop)) {
+ $fd = "$FEXHOME/locale/$lang/lib/$fs";
+ symlink "../../../lib/$fs",$fd and print "$fd linked\n";
+ }
+
+ unless (-f "$FEXHOME/locale/$lang/htdocs/FAQ/meta.faq") {
+ unlink "$FEXHOME/locale/$lang/htdocs/FAQ/FAQ.html";
+ rmdir "$FEXHOME/locale/$lang/htdocs/FAQ";
+ }
-unless (-f "$FEXHOME/locale/$lang/htdocs/FAQ/meta.faq") {
- unlink "$FEXHOME/locale/$lang/htdocs/FAQ/FAQ.html";
- rmdir "$FEXHOME/locale/$lang/htdocs/FAQ";
}
make_lf($lang);
print {$lf} "### auto-generated by install/translate - DO NOT EDIT! ###\n\n";
local $/;
$_ = <$fexpp>;
- s/.*\n(\#\#\# locale functions)/$1/s;
+ s/.*\n(\#\#\#* locale functions)/$1/s;
s/\nsub (\w+)/\n\$$1\{$lang\} = sub/gs;
s/\n\}\n/\n\};\n/gs;
print {$lf} $_;