From ccc9b6abb66ebda0b91b4e21f8ec2fb2e87390f7 Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Wed, 27 Dec 2023 18:33:06 +0100 Subject: add a --dev mode --- tests/unix2dos.py | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100755 tests/unix2dos.py (limited to 'tests/unix2dos.py') diff --git a/tests/unix2dos.py b/tests/unix2dos.py deleted file mode 100755 index 4e6c9cf..0000000 --- a/tests/unix2dos.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python3 -import sys - -buf = "" -with open(sys.argv[1], 'r+b') as f: - buf = f.read() - -if buf.find(b'\r\n'): - print(f"{sys.argv[1]} is already a CRLF file") - sys.exit(1) - -buf = buf.replace(b'\n', b'\r\n') - -with open(sys.argv[1], 'w+b') as f: - f.write(buf) -- cgit v1.2.3