-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Sed compatibility #2981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sed compatibility #2981
Changes from 1 commit
941cc12
96e7d29
d40fed7
1a28ad1
cfccf4b
e34d23e
2f6fed7
a24149f
48c09a5
73ec088
d8d225c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,11 +3,11 @@ | |
|
|
||
| # Let's run a set of in-place modifications by sed-commands, | ||
| for file in $@; do | ||
| sed -i 's/; \/\//; \/\//' $file # '; //' -> '; //' | ||
| sed -i 's/{ \/\//{ \/\//' $file # '{ //' -> '{ //' | ||
| sed -i 's/} \/\//} \/\//' $file # '} //' -> '} //' | ||
| sed -i 's/for(/for (/' $file # 'for(' -> 'for (' | ||
| sed -i 's/if(/if (/' $file # 'if(' -> 'if (' | ||
| sed -i 's/\s\s*$//' $file # 'remove white-space at the end of lines' | ||
| perl -i -pe 's/; \/\//; \/\//' $file # '; //' -> '; //' | ||
| perl -i -pe 's/{ \/\//{ \/\//' $file # '{ //' -> '{ //' | ||
| perl -i -pe 's/} \/\//} \/\//' $file # '} //' -> '} //' | ||
| perl -i -pe 's/for(/for (/' $file # 'for(' -> 'for (' | ||
| perl -i -pe 's/if(/if (/' $file # 'if(' -> 'if (' | ||
| perl -i -pe 's/\s\s*$//' $file # 'remove white-space at the end of lines' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tested this and it seemed to remove the final newline.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @danpovey, as a project to use clang-tidy is under way, maybe we should not touch this file at all? It's a maintainer's file, so presumably sed is fine here for the time being, only a handful of people run it if ever. |
||
| done | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.