cmake fix po generation/update: msguniq.exe doesn't like dos line endings (produces broken pot files)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39914 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Peter Kümmel 2011-10-21 23:22:58 +00:00
parent 6fd4bb443e
commit bb53335350
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,17 @@
#! /usr/bin/env python
###############
import sys
for fname in sys.argv[1:]:
infile = open( fname, "rb" )
instr = infile.read()
infile.close()
outstr = instr.replace( "\r\n", "\n" ).replace( "\r", "\n" )
if len(outstr) == len(instr):
continue
outfile = open( fname , "wb" )
outfile.write( outstr )
outfile.close()

View File

@ -0,0 +1,17 @@
#! /usr/bin/env python
###############
import sys
for fname in sys.argv[1:]:
infile = open( fname, "rb" )
instr = infile.read()
infile.close()
outstr = instr.replace( "\r\n", "\n" ).replace( "\r", "\n" ).replace( "\n", "\r\n" )
if len(outstr) == len(instr):
continue
outfile = open( fname , "wb" )
outfile.write( outstr )
outfile.close()