diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-07-07 18:04:27 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2008-07-07 19:00:30 +0200 |
commit | b146edfb161d5952e1bc34e7fd768fb2b4be9d02 (patch) | |
tree | 3f2310aa812e855b05076a68dfae90cd42f72b9b /Rakefile | |
parent | 41ee2094532eb26b2bd0577ecbdea55ad0bdb769 (diff) |
Rakefile: ensure that the placeholder PACKAGE VERSION is properly replaced
Diffstat (limited to 'Rakefile')
-rw-r--r-- | Rakefile | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -42,11 +42,6 @@ end def normalize_po(fn) content = File.read(fn) - # replace project-id-version placholder - modified = content.sub!(/^("Project-Id-Version: )PACKAGE VERSION(\\n")$/) { - "#{$1}rbot#{$2}" - } - # sort the messages by file location if MSGCAT sorted = `#{MSGCAT} --width=79 --sort-by-file #{fn}` @@ -56,6 +51,11 @@ def normalize_po(fn) end end + # replace project-id-version placholder + modified |= content.sub!(/^("Project-Id-Version: )PACKAGE VERSION(\\n")$/) { + "#{$1}rbot#{$2}" + } + if modified File.open(fn, 'w') {|f| f.write content} end |