]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - Rakefile
Rakefile: ensure that the placeholder PACKAGE VERSION is properly replaced
[user/henk/code/ruby/rbot.git] / Rakefile
index f5b3a1261b267b5a0a484763b05514d8819cfaae..88714cf14dd09d00bcee07163fca4a0e79f8f915 100644 (file)
--- 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