Mercurial > kallithea
comparison whitespacecleanup.sh @ 5477:6f60bd9090b1 stable
release: merge default to stable for 0.3
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Sun, 06 Sep 2015 23:36:05 +0200 |
parents | 530bcb645d32 |
children |
comparison
equal
deleted
inserted
replaced
5267:763dc7a96bae | 5477:6f60bd9090b1 |
---|---|
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 loc '*.py' '*.html' '*.css' '*.rst' '*.txt' '*.js' | egrep -v '/lockfiles.py|LICENSE-MERGELY.html|/codemirror/|/fontello/|(graph|mergely|native.history|select2/select2|yui.flot)\.js$'` | 5 files=`hg loc '*.py' '*.html' '*.css' '*.rst' '*.txt' '*.js' '*.ini' '*.cfg' CONTRIBUTORS LICENSE.md| egrep -v '/lockfiles.py|LICENSE-MERGELY.html|/codemirror/|/fontello/|(graph|mergely|native.history|select2/select2|yui.flot|yui.2.9)\.js$'` |
6 sed -i "s,`printf '\t'`, ,g" $files | |
7 sed -i "s, *$,,g" $files | |
8 | 6 |
9 sed -i 's,\([^ /]\){,\1 {,g' `hg loc '*.css'` | 7 sed -i -e "s,`printf '\t'`, ,g" $files |
10 sed -i 's|^\([^ /].*,\)\([^ ]\)|\1 \2|g' `hg loc '*.css'` | 8 sed -i -e "s, *$,,g" $files |
9 # ensure one trailing newline - remove empty last line and make last line include trailing newline: | |
10 sed -i -e '$,${/^$/d}' -e '$a\' $files | |
11 | 11 |
12 sed -i 's/^\( [^: ]*\) *: *\([^/]\)/\1: \2/g' kallithea/public/css/{style,contextbar}.css | 12 sed -i -e 's,\([^ /]\){,\1 {,g' `hg loc '*.css'` |
13 sed -i '1s|, |,|g' kallithea/public/css/{style,contextbar}.css | 13 sed -i -e 's|^\([^ /].*,\)\([^ ]\)|\1 \2|g' `hg loc '*.css'` |
14 sed -i 's/^\([^ ,/]\+ [^,]*[^ ,]\) *, *\(.\)/\1,\n\2/g' kallithea/public/css/{style,contextbar}.css | 14 |
15 sed -i 's/^\([^ ,/].*\) */\1 /g' kallithea/public/css/{style,contextbar}.css | 15 sed -i -e 's/^\( [^: ]*\) *: *\([^/]\)/\1: \2/g' kallithea/public/css/{style,contextbar}.css |
16 sed -i 's,^--$,-- ,g' kallithea/templates/email_templates/main.txt | 16 sed -i -e '1s|, |,|g' kallithea/public/css/{style,contextbar}.css |
17 sed -i -e 's/^\([^ ,/]\+ [^,]*[^ ,]\) *, *\(.\)/\1,\n\2/g' kallithea/public/css/{style,contextbar}.css | |
18 sed -i -e 's/^\([^ ,/].*\) */\1 /g' kallithea/public/css/{style,contextbar}.css | |
19 sed -i -e 's,^--$,-- ,g' kallithea/templates/email_templates/main.txt | |
20 | |
21 hg mani | xargs chmod -x | |
22 hg loc 'set:!binary()&grep("^#!")&!(**_tmpl.py)&!(**/template**)' | xargs chmod +x | |
17 | 23 |
18 hg diff | 24 hg diff |