aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-15 22:36:56 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-15 22:36:56 +0000
commit8567ee21f1a7103a4d8d0b4c85dd3af31be4926e (patch)
tree3094e4352c507361243383731c6c5c9ee8027051
parent5746309cb4be2073d550ad7a6885e918631dbc38 (diff)
downloadgnunet-8567ee21f1a7103a4d8d0b4c85dd3af31be4926e.tar.gz
gnunet-8567ee21f1a7103a4d8d0b4c85dd3af31be4926e.zip
prec
-rwxr-xr-xpre-commit17
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 2find src/ -name "*.c" -exec indent {} \;
3l="" 3find src/ -name "*.c" -exec indent {} \;
4for n in `find . -name "no-indent"`
5do
6 n=`dirname "$n"`
7 l="-and -not -path \"$n/*\" $l"
8done
9indent -nut `echo $l | xargs find . -name "*.c"`
10indent -nut `echo $l | xargs find . -name "*.h"`
11if test -x "`which 'dos2unix'`" 4if test -x "`which 'dos2unix'`"
12then 5then
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 "*.?~"`
16fi 8fi
17