diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2009-06-17 13:15:46 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2009-06-17 13:15:46 +0000 |
commit | 04623c0739fd41eca6382f3534efb5d6332e9bd1 (patch) | |
tree | bf1ddd2735aa965201eae5418bb73940e250abe2 /helpcontent2/helpers | |
parent | c6b61710c44abd1b8dda1f3e3736fe6bc19ac1b4 (diff) |
CWS-TOOLING: integrate CWS l10ncleanup04
2009-05-28 13:46:54 +0200 ihi r272407 : remove forgotten sdf's
2009-05-25 22:32:35 +0200 ihi r272273 : no WITH_LANG fix
2009-05-25 20:45:58 +0200 ihi r272272 : remove some comments
2009-05-25 19:55:21 +0200 ihi r272271 : svx dialog -> cui l10n move
2009-05-25 18:30:58 +0200 ihi r272268 : build fix
2009-05-18 16:32:02 +0200 ihi r272033 : bash fix
2009-05-18 16:31:32 +0200 ihi r272032 : bash fix
2009-05-14 16:23:39 +0200 ihi r271901 : #i79750# Translation moved to l10n module
2009-05-11 23:36:05 +0200 ihi r271793 : #i79750# Translation moved into own module
Diffstat (limited to 'helpcontent2/helpers')
-rw-r--r-- | helpcontent2/helpers/update_tree.pl | 44 |
1 files changed, 40 insertions, 4 deletions
diff --git a/helpcontent2/helpers/update_tree.pl b/helpcontent2/helpers/update_tree.pl index 36fab9ac5d..ae7dddf0d6 100644 --- a/helpcontent2/helpers/update_tree.pl +++ b/helpcontent2/helpers/update_tree.pl @@ -38,6 +38,10 @@ use File::Copy qw/cp mv/; use File::Basename; use Benchmark; +my $is_win = "false"; + +$is_win = "true" , if ( defined $ENV{USE_SHELL} && $ENV{USE_SHELL} eq "4nt" ); + $t0 = new Benchmark; # update the tree files in <platform>/misc/* @@ -60,12 +64,30 @@ $prj =~ s/\\/\//g if defined($prj); $inpath =~ s/\\/\//g; $destpath =~ s/\\/\//g; + if ( ! defined $prj ) { # do someting that works for manual call ($scriptname = `pwd`) =~ s/\n/\/$0/; ($tree_src = $scriptname) =~ s/\/update_tree.pl/\/..\/source\/auxiliary/; ($tree_dest = $scriptname) =~ s/\/update_tree.pl/\/..\/$destpath\/misc/; ($source_dir = $scriptname) =~ s/\/update_tree.pl/\/..\/source/; + if ( defined $ENV{TRYSDF} && defined $ENV{LOCALIZESDF} ) + { + if( defined $ENV{LOCALIZATION_FOUND} && $ENV{LOCALIZATION_FOUND} eq "YES" ) + { + $source_dir = $ENV{TRYSDF}; + } + else + { + $source_dir = $ENV{LOCALIZESDF}; + } + if( $is_win eq "false" ) { $source_dir =~ s/\/auxiliary\/localize.sdf$// ; } + else { $source_dir =~ s/\\auxiliary\\localize.sdf$// ; } + + } + #else {die "ERROR: The env variables TRYSDF LOCALIZATION_FOUND LOCALIZESDF not found ... something is wrong!\n";} + + $treestrings = "$source_dir/text/shared/tree_strings.xhp"; } else { $tree_src = "$prj\/source\/auxiliary"; @@ -73,10 +95,21 @@ if ( ! defined $prj ) { $source_dir = "$prj\/source"; $treestrings = "$source_dir/text/shared/tree_strings.xhp"; - print "$tree_src\n"; - print "$tree_dest\n"; - print "$source_dir\n"; - print "$treestrings\n"; + if ( defined $ENV{TRYSDF} && defined $ENV{LOCALIZESDF} ) + { + if( defined $ENV{LOCALIZATION_FOUND} && $ENV{LOCALIZATION_FOUND} eq "YES" ) + { + $source_dir = $ENV{TRYSDF}; + } + else + { + $source_dir = $ENV{LOCALIZESDF}; + } + if( $is_win eq "false" ) { $source_dir =~ s/\/auxiliary\/localize.sdf$// ; } + else { $source_dir =~ s/\\auxiliary\\localize.sdf$// ; } + } + #else {die "ERROR: The env variables TRYSDF LOCALIZATION_FOUND LOCALIZESDF not found ... something is wrong!\n";} + } # Get the English tree files as master @@ -313,6 +346,9 @@ sub readtv { sub read_loc { print "\n\nReading localized titles..."; $/ = "\n"; + my $path = "$source_dir/text"; + $path =~ s/\//\\/g , if $is_win eq "true"; + print " in $source_dir/text\n"; @files = `find $source_dir/text -name localize.sdf`; for my $fname (@files) { $FS = '\t'; |