fix for line endings
This commit is contained in:
parent
fd8abd174e
commit
d73eebdd32
8
build.py
8
build.py
@ -4,17 +4,17 @@ import glob
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
def readfile(fn):
|
def readfile(fn):
|
||||||
with open(fn, 'rb') as f:
|
with open(fn, 'Ur') as f:
|
||||||
return f.read()
|
return f.read()
|
||||||
|
|
||||||
c = '\r\n\r\n'.join(map(readfile, glob.glob('code/*')))
|
c = '\n\n'.join(map(readfile, glob.glob('code/*')))
|
||||||
n = time.strftime('%Y-%m-%d-%H%M%S')
|
n = time.strftime('%Y-%m-%d-%H%M%S')
|
||||||
m = readfile('main.js').replace('@@BUILDDATE@@', n)
|
m = readfile('main.js').replace('@@BUILDDATE@@', n)
|
||||||
m = m.split('@@INJECTHERE@@')
|
m = m.split('@@INJECTHERE@@')
|
||||||
m.insert(1, c)
|
m.insert(1, c)
|
||||||
t = '\r\n\r\n'.join(m)
|
t = '\n\n'.join(m)
|
||||||
|
|
||||||
with open('total-conversion-build.user.js', 'wb') as f:
|
with open('total-conversion-build.user.js', 'w') as f:
|
||||||
f.write(t)
|
f.write(t)
|
||||||
|
|
||||||
# vim: ai si ts=4 sw=4 sts=4 et
|
# vim: ai si ts=4 sw=4 sts=4 et
|
||||||
|
Loading…
x
Reference in New Issue
Block a user