aboutsummaryrefslogtreecommitdiff
path: root/etc/eol.lua
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-05-28 07:47:41 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-05-28 07:47:41 +0000
commit6c565dd7c06c96fd9b3394ade61f46da59590d30 (patch)
treef303c1a94627e002fa4dd73d2f2641596b8b1420 /etc/eol.lua
parent84f03fda7c2be57e14f937e295710b5e883fedc6 (diff)
downloadluasocket-6c565dd7c06c96fd9b3394ade61f46da59590d30.tar.gz
luasocket-6c565dd7c06c96fd9b3394ade61f46da59590d30.tar.bz2
luasocket-6c565dd7c06c96fd9b3394ade61f46da59590d30.zip
Almost there.
Diffstat (limited to 'etc/eol.lua')
-rw-r--r--etc/eol.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/eol.lua b/etc/eol.lua
index aa43596..b13684b 100644
--- a/etc/eol.lua
+++ b/etc/eol.lua
@@ -1,6 +1,9 @@
1require"mime.lua"
2require"ltn12.lua"
3
1local marker = '\n' 4local marker = '\n'
2if arg and arg[1] == '-d' then marker = '\r\n' end 5if arg and arg[1] == '-d' then marker = '\r\n' end
3local filter = mime.normalize(marker) 6local filter = mime.normalize(marker)
4local source = ltn12.source.chain(ltn12.source.file(io.stdin), filter) 7local source = ltn12.source.chain(ltn12.source.file(io.stdin), filter)
5local sink = ltn12.sink.file(io.stdout) 8local sink = ltn12.sink.file(io.stdout)
6ltn12.pump(source, sink) 9ltn12.pump.all(source, sink)