fix for line endings

This commit is contained in:
Evan Paul Fletcher 2013-02-07 20:17:13 -07:00
parent fd8abd174e
commit d73eebdd32

View File

@ -4,17 +4,17 @@ import glob
import time
def readfile(fn):
with open(fn, 'rb') as f:
with open(fn, 'Ur') as f:
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')
m = readfile('main.js').replace('@@BUILDDATE@@', n)
m = m.split('@@INJECTHERE@@')
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)
# vim: ai si ts=4 sw=4 sts=4 et