lyx_mirror/development/cmake/po/unix2dos.py
José Matos 3f03f0a447 Move all python shebangs from /usr/bin/env to python3.
The change is only relevant to development as all the call to python scripts is done
calling C++ os::python that invoques the appropriate python version.

The change is two fold, on one hand remove all the uses of /usr/bin/env for python.

On the other hand rename all the calls to python from python to python3 making it explicit
and being compliant with PEP 394 -- The "python" Command on Unix-Like Systems:
https://www.python.org/dev/peps/pep-0394/

Remove the sheebang from src/graphics/GraphicsConverter.cpp because it is not necessary.

Some small whitespace changes.
2018-12-29 19:14:41 +00:00

18 lines
385 B
Python

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