Changeset 337
- Timestamp:
- 04/17/08 21:31:56 (2 years ago)
- Files:
-
- trunk/uploadr/xulrunner_locales/build.pl (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/uploadr/xulrunner_locales/build.pl
r335 r337 32 32 `rm $dir/??-??.*`; 33 33 34 mkdir "$dir/build";34 `mkdir $dir/build`; 35 35 `rm -r $dir/build/*`; 36 36 … … 42 42 mkdir "$dir/build/locale/$locale"; 43 43 44 `cp -r $dir/locale/en-US/* $dir/build/locale/$locale/`;44 ©_files_to("$dir/locale/en-US/", "$dir/build/locale/$locale/"); 45 45 46 46 if ($locale ne 'en-US'){ 47 47 48 `cp -r $dir/locale/$locale/* $dir/build/locale/$locale/`;48 ©_files_to("$dir/locale/$locale/", "$dir/build/locale/$locale/"); 49 49 } 50 50 … … 83 83 84 84 print "ok, all done!\n"; 85 86 87 88 89 sub copy_files_to { 90 91 my ($src, $dst) = @_; 92 93 my @lines = split "\n", `find $src | grep -v .svn`; 94 95 my $src_q = quotemeta $src; 96 97 for my $file (@lines){ 98 99 $file =~ s/^$src_q//; 100 101 if (length $file){ 102 103 if (-f "$src$file"){ 104 105 `cp $src$file $dst$file`; 106 } 107 108 if (-d "$src$file" && !-d "$dst$file"){ 109 110 `mkdir $dst$file`; 111 } 112 } 113 } 114 }