diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-05-29 00:46:26 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-05-29 00:46:26 +0000 |
commit | 0a217a8df1657b4334b55b0e4a6c7837a8dbcfd9 (patch) | |
tree | 6b552f40eb089db96409a312a98d9b12bd669102 /pre-commit | |
download | gnunet-0a217a8df1657b4334b55b0e4a6c7837a8dbcfd9.tar.gz gnunet-0a217a8df1657b4334b55b0e4a6c7837a8dbcfd9.zip |
ng
Diffstat (limited to 'pre-commit')
-rwxr-xr-x | pre-commit | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pre-commit b/pre-commit new file mode 100755 index 000000000..b733c44fa --- /dev/null +++ b/pre-commit | |||
@@ -0,0 +1,17 @@ | |||
1 | #!/bin/sh | ||
2 | # NOTE: "touch mydir/no-indent" to make the tree starting at mydir untouchable | ||
3 | l="" | ||
4 | for n in `find . -name "no-indent"` | ||
5 | do | ||
6 | n=`dirname "$n"` | ||
7 | l="-and -not -path \"$n/*\" $l" | ||
8 | done | ||
9 | indent -nut `echo $l | xargs find . -name "*.c"` | ||
10 | indent -nut `echo $l | xargs find . -name "*.h"` | ||
11 | if test -x "`which 'dos2unix'`" | ||
12 | then | ||
13 | dos2unix -ko `echo $l | xargs find . -name "*.c"` | ||
14 | dos2unix -ko `echo $l | xargs find . -name "*.h"` | ||
15 | rm `echo $l | xargs find . -name "*.?~"` | ||
16 | fi | ||
17 | |||