[GRASS-SVN] r32413 - grass/trunk/tools
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jul 31 13:45:27 EDT 2008
Author: glynn
Date: 2008-07-31 13:45:27 -0400 (Thu, 31 Jul 2008)
New Revision: 32413
Modified:
grass/trunk/tools/grass_indent.sh
grass/trunk/tools/grass_indent_ALL.sh
Log:
Indent only works for C, not C++
Fix directory check
Modified: grass/trunk/tools/grass_indent.sh
===================================================================
--- grass/trunk/tools/grass_indent.sh 2008-07-31 17:44:22 UTC (rev 32412)
+++ grass/trunk/tools/grass_indent.sh 2008-07-31 17:45:27 UTC (rev 32413)
@@ -8,5 +8,5 @@
else
indent -bad -bap -bbb -br -bli0 -bls -cli0 -ncs -fc1 -hnl -i4 \
-nbbo -nbc -nbfda -nbfde -ncdb -ncdw -nce -nfca -npcs -nprs \
- -npsl -nsc -nsob -saf -sai -saw -sbi0 -ss -ts8 -ut $@
+ -npsl -nsc -nsob -saf -sai -saw -sbi0 -ss -ts8 -ut "$@"
fi
Modified: grass/trunk/tools/grass_indent_ALL.sh
===================================================================
--- grass/trunk/tools/grass_indent_ALL.sh 2008-07-31 17:44:22 UTC (rev 32412)
+++ grass/trunk/tools/grass_indent_ALL.sh 2008-07-31 17:45:27 UTC (rev 32413)
@@ -4,18 +4,10 @@
# loops over entire GRASS source code tree and indents source code according to SUBMITTING rules
#are we in the tools/ dir? We should not.
-l$ tools 2> /dev/null
-if [ $? -ne 0 ] ; then
- echo "ERROR: this script must be run from the main GRASS source code directory"
+if [ -d tools ] ; then
+ echo "ERROR: this script must be run from the main GRASS source code directory" >&2
exit 1
fi
-echo "Indenting *.c and *.h..."
-find . -type f -name "*.[ch]" | xargs ./tools/grass_indent.sh
-
-echo "Indenting *.cpp..."
-find . -type f -name "*.cpp" | xargs ./tools/grass_indent.sh
-
-echo "Indenting *.cc..."
-find . -type f -name "*.cc" | xargs ./tools/grass_indent.sh
-
+echo "Indenting *.c and *.h..." >&2
+find . -type f -name "*.[ch]" -print0 | xargs -0 ./tools/grass_indent.sh
More information about the grass-commit
mailing list