summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-07-07 18:04:27 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-07-07 19:00:30 +0200
commitb146edfb161d5952e1bc34e7fd768fb2b4be9d02 (patch)
tree3f2310aa812e855b05076a68dfae90cd42f72b9b /Rakefile
parent41ee2094532eb26b2bd0577ecbdea55ad0bdb769 (diff)
Rakefile: ensure that the placeholder PACKAGE VERSION is properly replaced
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile10
1 files 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