diff options
author | Nils Gillmann <ng0@n0.is> | 2018-05-17 16:38:30 +0000 |
---|---|---|
committer | Nils Gillmann <ng0@n0.is> | 2018-05-17 16:38:30 +0000 |
commit | 4a95f48489d0046c4aad919d73573e1a6616688b (patch) | |
tree | 62c274cd29455e5c693de8f3c6a8336f4b785087 /contrib/removetrailingwhitespace | |
parent | 93d2f7aa829d921527efb92b10c12d64552e1f12 (diff) | |
download | gnunet-4a95f48489d0046c4aad919d73573e1a6616688b.tar.gz gnunet-4a95f48489d0046c4aad919d73573e1a6616688b.zip |
contrib/removetrailingwhitespace: sed the python
Signed-off-by: Nils Gillmann <ng0@n0.is>
Diffstat (limited to 'contrib/removetrailingwhitespace')
-rwxr-xr-x | contrib/removetrailingwhitespace | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/contrib/removetrailingwhitespace b/contrib/removetrailingwhitespace deleted file mode 100755 index 9e620cbb2..000000000 --- a/contrib/removetrailingwhitespace +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | #!/usr/bin/python | ||
2 | |||
3 | import sys | ||
4 | import re | ||
5 | |||
6 | for fileName in sys.argv[1:]: | ||
7 | f = open(fileName, 'r+') | ||
8 | fileString = f.read() | ||
9 | |||
10 | fileString = re.sub(r'[ ]+\n', r'\n', fileString) | ||
11 | fileString = re.sub(r'\r', r'', fileString) | ||
12 | f.seek(0) | ||
13 | f.write(fileString) | ||
14 | f.truncate(len(fileString)) | ||