Show More
@@ -1,12 +1,13 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | # Convenience script for running various idempotent source code cleanup scripts |
|
3 | # Convenience script for running various idempotent source code cleanup scripts | |
4 |
|
4 | |||
5 | set -e |
|
5 | set -e | |
6 | set -x |
|
6 | set -x | |
7 |
|
7 | |||
8 | scripts/docs-headings.py |
|
8 | scripts/docs-headings.py | |
9 | scripts/generate-ini.py |
|
9 | scripts/generate-ini.py | |
10 | scripts/whitespacecleanup.sh |
|
10 | scripts/whitespacecleanup.sh | |
11 |
|
11 | |||
12 | hg loc 'set:!binary()&grep("^#!.*python")' '*.py' | xargs scripts/pyflakes |
|
12 | hg loc 'set:!binary()&grep("^#!.*python")' '*.py' | xargs scripts/pyflakes | |
|
13 | echo "no blocking problems found by $0" |
@@ -1,23 +1,24 b'' | |||||
1 | #!/bin/bash -x |
|
1 | #!/bin/bash -x | |
2 |
|
2 | |||
3 | # Enforce some consistency in whitespace - just to avoid spurious whitespaces changes |
|
3 | # Enforce some consistency in whitespace - just to avoid spurious whitespaces changes | |
4 |
|
4 | |||
5 | files=`hg mani | egrep -v '/fontello/|/email_templates/|(^LICENSE-MERGELY.html|^docs/Makefile|^scripts/whitespacecleanup.sh|/(graph|mergely|native.history)\.js|/test_dump_html_mails.ref.html|\.png|\.gif|\.ico|\.pot|\.po|\.mo|\.tar\.gz|\.diff)$'` |
|
5 | files=`hg mani | egrep -v '/fontello/|/email_templates/|(^LICENSE-MERGELY.html|^docs/Makefile|^scripts/whitespacecleanup.sh|/(graph|mergely|native.history)\.js|/test_dump_html_mails.ref.html|\.png|\.gif|\.ico|\.pot|\.po|\.mo|\.tar\.gz|\.diff)$'` | |
6 |
|
6 | |||
7 | sed -i "s/`printf '\r'`//g" $files |
|
7 | sed -i "s/`printf '\r'`//g" $files | |
8 | sed -i -e "s,`printf '\t'`, ,g" $files |
|
8 | sed -i -e "s,`printf '\t'`, ,g" $files | |
9 | sed -i -e "s, *$,,g" $files |
|
9 | sed -i -e "s, *$,,g" $files | |
10 | sed -i -e 's,\([^ ]\)\\$,\1 \\,g' -e 's,\(["'"'"']["'"'"']["'"'"']\) \\$,\1\\,g' $files |
|
10 | sed -i -e 's,\([^ ]\)\\$,\1 \\,g' -e 's,\(["'"'"']["'"'"']["'"'"']\) \\$,\1\\,g' $files | |
11 | # ensure one trailing newline - remove empty last line and make last line include trailing newline: |
|
11 | # ensure one trailing newline - remove empty last line and make last line include trailing newline: | |
12 | sed -i -e '$,${/^$/d}' -e '$a\' $files |
|
12 | sed -i -e '$,${/^$/d}' -e '$a\' $files | |
13 |
|
13 | |||
14 | sed -i -e 's,\([^ /]\){,\1 {,g' `hg loc '*.css'` |
|
14 | sed -i -e 's,\([^ /]\){,\1 {,g' `hg loc '*.css'` | |
15 | sed -i -e 's|^\([^ /].*,\)\([^ ]\)|\1 \2|g' `hg loc '*.css'` |
|
15 | sed -i -e 's|^\([^ /].*,\)\([^ ]\)|\1 \2|g' `hg loc '*.css'` | |
16 |
|
16 | |||
17 | hg mani | xargs chmod -x |
|
17 | hg mani | xargs chmod -x | |
18 | hg loc 'set:!binary()&grep("^#!")&!(**_tmpl.py)&!(**/template**)' | xargs chmod +x |
|
18 | hg loc 'set:!binary()&grep("^#!")&!(**_tmpl.py)&!(**/template**)' | xargs chmod +x | |
19 |
|
19 | |||
20 | # isort is installed from dev_requirements.txt |
|
20 | # isort is installed from dev_requirements.txt | |
21 | hg loc 'set:!binary()&grep("^#!.*python")' '*.py' | xargs isort --line-width 160 --lines-after-imports 2 |
|
21 | hg loc 'set:!binary()&grep("^#!.*python")' '*.py' | xargs isort --line-width 160 --lines-after-imports 2 | |
22 |
|
22 | |||
|
23 | echo "diff after $0:" | |||
23 | hg diff |
|
24 | hg diff |
General Comments 0
You need to be logged in to leave comments.
Login now