localeVersion = '1.7a'
def fileerb( source, newLocaleVersion )
src = File::readlines( source ).join
if /localeVersion="([0-9\.ab]+)"/.match( src ) then
if $1 != newLocaleVersion then
print 'Updated: '+source+"\n"
datetime = File::mtime( source )
File::open( source, 'w' ) do |fp|
fp.binmode
fp.write( src.gsub( /localeVersion="([0-9\.ab]+)"/, 'localeVersion="'+newLocaleVersion+'"' ) )
end
File::utime( datetime, datetime, source )
end
end
end
files = Array.new
files = [
'ja-JP\locale\ja-JP\autoconfig\contents.rdf',
# 'ja-JP\locale\ja-JP\browser\contents.rdf',
'ja-JP\locale\ja-JP\communicator\contents.rdf',
'ja-JP\locale\ja-JP\cookie\contents.rdf',
'ja-JP\locale\ja-JP\global\contents.rdf',
'ja-JP\locale\ja-JP\inspector\contents.rdf',
'ja-JP\locale\ja-JP\mozapps\contents.rdf',
'ja-JP\locale\ja-JP\navigator\contents.rdf',
'ja-JP\locale\ja-JP\necko\contents.rdf',
'ja-JP\locale\ja-JP\p3p\contents.rdf',
'ja-JP\locale\ja-JP\passwordmgr\contents.rdf',
'ja-JP\locale\ja-JP\pipnss\contents.rdf',
# 'ja-JP\locale\ja-JP\pippki\contents.rdf',
'ja-mac\locale\ja-JP\communicator-platform\contents.rdf',
'ja-mac\locale\ja-JP\global-platform\contents.rdf',
'ja-mac\locale\ja-JP\navigator-platform\contents.rdf',
'ja-unix\locale\ja-JP\communicator-platform\contents.rdf',
'ja-unix\locale\ja-JP\global-platform\contents.rdf',
'ja-unix\locale\ja-JP\navigator-platform\contents.rdf',
'ja-win\locale\ja-JP\communicator-platform\contents.rdf',
'ja-win\locale\ja-JP\global-platform\contents.rdf',
'ja-win\locale\ja-JP\navigator-platform\contents.rdf',
# 'JP\locale\JP\browser-region\contents.rdf',
'JP\locale\JP\communicator-region\contents.rdf',
'JP\locale\JP\global-region\contents.rdf',
'JP\locale\JP\navigator-region\contents.rdf'
]
files.each do |fname|
fileerb( fname, localeVersion )
end |