You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2005/02/03 03:49:17 UTC
svn commit: r151105 - incubator/directory/codesize.sh
Author: akarasulu
Date: Wed Feb 2 18:49:15 2005
New Revision: 151105
URL: http://svn.apache.org/viewcvs?view=rev&rev=151105
Log:
Patch from E. Leacharny: http://issues.apache.org/jira/browse/DIR-99
Modified:
incubator/directory/codesize.sh
Modified: incubator/directory/codesize.sh
URL: http://svn.apache.org/viewcvs/incubator/directory/codesize.sh?view=diff&r1=151104&r2=151105
==============================================================================
--- incubator/directory/codesize.sh (original)
+++ incubator/directory/codesize.sh Wed Feb 2 18:49:15 2005
@@ -7,14 +7,9 @@
continue;
fi;
- mkdir temp
- for file in `find $trunk -type f -regex '.*\.java'`; do
- cp $file temp;
- done;
- cd temp;
- lines=`wc -l * | grep total | awk '{print $1}'`;
- cd ../
- rm -rf temp;
+ lines=$(for file in $(find $trunk -type f -name "*.java"); do wc -l $file; done | awk '{sum += $col} END {print sum}')
+
+
echo "lines of code in $trunk = $lines";
total=$(($lines + $total));
done;