summaryrefslogtreecommitdiff
path: root/sys/src/cmd/python/Tools/scripts/lfcr.py
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2021-06-14 00:00:37 +0000
committerOri Bernstein <ori@eigenstate.org>2021-06-14 00:00:37 +0000
commita73a964e51247ed169d322c725a3a18859f109a3 (patch)
tree3f752d117274d444bda44e85609aeac1acf313f3 /sys/src/cmd/python/Tools/scripts/lfcr.py
parente64efe273fcb921a61bf27d33b230c4e64fcd425 (diff)
python, hg: tow outside the environment.
they've served us well, and can ride off into the sunset.
Diffstat (limited to 'sys/src/cmd/python/Tools/scripts/lfcr.py')
-rwxr-xr-xsys/src/cmd/python/Tools/scripts/lfcr.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/sys/src/cmd/python/Tools/scripts/lfcr.py b/sys/src/cmd/python/Tools/scripts/lfcr.py
deleted file mode 100755
index babafae32..000000000
--- a/sys/src/cmd/python/Tools/scripts/lfcr.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#! /usr/bin/env python
-
-"Replace LF with CRLF in argument files. Print names of changed files."
-
-import sys, re, os
-
-def main():
- for filename in sys.argv[1:]:
- if os.path.isdir(filename):
- print filename, "Directory!"
- continue
- data = open(filename, "rb").read()
- if '\0' in data:
- print filename, "Binary!"
- continue
- newdata = re.sub("\r?\n", "\r\n", data)
- if newdata != data:
- print filename
- f = open(filename, "wb")
- f.write(newdata)
- f.close()
-
-if __name__ == '__main__':
- main()