aboutsummaryrefslogtreecommitdiff
path: root/pre-commit
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 /pre-commit
parent5746309cb4be2073d550ad7a6885e918631dbc38 (diff)
prec
Diffstat (limited to 'pre-commit')
-rwxr-xr-xpre-commit17
1 files changed, 4 insertions, 13 deletions
diff --git a/pre-commit b/pre-commit
index b733c44fa1..2fc554236d 100755
--- a/pre-commit
+++ b/pre-commit
@@ -1,17 +1,8 @@
#!/bin/sh
-# NOTE: "touch mydir/no-indent" to make the tree starting at mydir untouchable
-l=""
-for n in `find . -name "no-indent"`
-do
- n=`dirname "$n"`
- l="-and -not -path \"$n/*\" $l"
-done
-indent -nut `echo $l | xargs find . -name "*.c"`
-indent -nut `echo $l | xargs find . -name "*.h"`
+find src/ -name "*.c" -exec indent {} \;
+find src/ -name "*.c" -exec indent {} \;
if test -x "`which 'dos2unix'`"
then
- dos2unix -ko `echo $l | xargs find . -name "*.c"`
- dos2unix -ko `echo $l | xargs find . -name "*.h"`
- rm `echo $l | xargs find . -name "*.?~"`
+ find src/ -name "*.c" -exec dos2unix {} \;
+ find src/ -name "*.c" -exec dos2unix {} \;
fi
-