* enc/trans/make_transdb.rb: check $(srcdir)/enc/trans before

enc/trans.

* enc/trans/make_transdb.rb: keep names_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2008-09-03 08:57:18 +00:00
Родитель 204929af9d
Коммит 42a48c1e9d
2 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -1,3 +1,10 @@
Wed Sep 3 17:48:32 2008 NARUSE, Yui <naruse@ruby-lang.org>
* enc/trans/make_transdb.rb: check $(srcdir)/enc/trans before
enc/trans.
* enc/trans/make_transdb.rb: keep names_t.
Wed Sep 3 16:54:46 2008 Koichi Sasada <ko1@atdot.net> Wed Sep 3 16:54:46 2008 Koichi Sasada <ko1@atdot.net>
* include/ruby/signal.h: removed. * include/ruby/signal.h: removed.

Просмотреть файл

@ -13,7 +13,7 @@ outhdr = transdirs.shift || 'transdb.h'
transdirs << 'enc/trans' if transdirs.empty? transdirs << 'enc/trans' if transdirs.empty?
transdirs = transdirs.sort_by {|td| transdirs = transdirs.sort_by {|td|
td.length -td.length
}.inject([]) {|tds, td| }.inject([]) {|tds, td|
next tds unless File.directory?(td) next tds unless File.directory?(td)
tds << td if tds.all? {|td2| !File.identical?(td2, td) } tds << td if tds.all? {|td2| !File.identical?(td2, td) }
@ -21,9 +21,10 @@ transdirs = transdirs.sort_by {|td|
} }
files = {} files = {}
names_t = []
transdirs.each do |transdir| transdirs.each do |transdir|
names = Dir.entries(transdir) names = Dir.entries(transdir)
names_t = names.map {|n| /(?!\A)\.trans\z/ =~ n ? $` : nil }.compact names_t += names.map {|n| /(?!\A)\.trans\z/ =~ n ? $` : nil }.compact
names_c = names.map {|n| /(?!\A)\.c\z/ =~ n ? $` : nil }.compact names_c = names.map {|n| /(?!\A)\.c\z/ =~ n ? $` : nil }.compact
(names_t & names_c).map {|n| (names_t & names_c).map {|n|
"#{n}.c" "#{n}.c"