From b146edfb161d5952e1bc34e7fd768fb2b4be9d02 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 7 Jul 2008 18:04:27 +0200 Subject: Rakefile: ensure that the placeholder PACKAGE VERSION is properly replaced --- Rakefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index f5b3a126..88714cf1 100644 --- a/Rakefile +++ b/Rakefile @@ -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 -- cgit v1.2.3