diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-15 22:36:56 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-15 22:36:56 +0000 |
commit | 8567ee21f1a7103a4d8d0b4c85dd3af31be4926e (patch) | |
tree | 3094e4352c507361243383731c6c5c9ee8027051 /pre-commit | |
parent | 5746309cb4be2073d550ad7a6885e918631dbc38 (diff) | |
download | gnunet-8567ee21f1a7103a4d8d0b4c85dd3af31be4926e.tar.gz gnunet-8567ee21f1a7103a4d8d0b4c85dd3af31be4926e.zip |
prec
Diffstat (limited to 'pre-commit')
-rwxr-xr-x | pre-commit | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/pre-commit b/pre-commit index b733c44fa..2fc554236 100755 --- a/pre-commit +++ b/pre-commit | |||
@@ -1,17 +1,8 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # NOTE: "touch mydir/no-indent" to make the tree starting at mydir untouchable | 2 | find src/ -name "*.c" -exec indent {} \; |
3 | l="" | 3 | find src/ -name "*.c" -exec indent {} \; |
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'`" | 4 | if test -x "`which 'dos2unix'`" |
12 | then | 5 | then |
13 | dos2unix -ko `echo $l | xargs find . -name "*.c"` | 6 | find src/ -name "*.c" -exec dos2unix {} \; |
14 | dos2unix -ko `echo $l | xargs find . -name "*.h"` | 7 | find src/ -name "*.c" -exec dos2unix {} \; |
15 | rm `echo $l | xargs find . -name "*.?~"` | ||
16 | fi | 8 | fi |
17 | |||