mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Move count.* to util
Also I made a first attempt at improving the line count. The old script missed a number of files in the directories it counted. The script is still not in line with the current code base though. A number of directories are still not counted (like gnome, engine, ledger, ...) git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18628 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
106
src/count.sh
106
src/count.sh
@@ -1,106 +0,0 @@
|
|||||||
#! /bin/sh
|
|
||||||
#
|
|
||||||
# Simple stupid utility to count lines of code
|
|
||||||
# The output may deceive you, remember to subtract 1 from file count
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "app utils:"
|
|
||||||
wc app-file/*.c app-utils/*.c calculation/*.c core-utils/*.c gnc-module/*.c network-utils/*.c tax/us/*.c
|
|
||||||
wc app-file/*.c app-utils/*.c calculation/*.c core-utils/*.c gnc-module/*.c network-utils/*.c tax/us/*.c | wc
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "app utils:"
|
|
||||||
wc app-file/*.h app-utils/*.h calculation/*.h core-utils/*.h gnc-module/*.h network-utils/*.h tax/us/*.h
|
|
||||||
wc app-file/*.h app-utils/*.h calculation/*.h core-utils/*.h gnc-module/*.h network-utils/*.h tax/us/*.h | wc
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "app utils:"
|
|
||||||
wc app-file/*.scm app-utils/*.scm calculation/*.scm core-utils/*.scm gnc-module/*.scm network-utils/*.scm tax/us/*.scm
|
|
||||||
wc app-file/*.scm app-utils/*.scm calculation/*.scm core-utils/*.scm gnc-module/*.scm network-utils/*.scm tax/us/*.scm | wc
|
|
||||||
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "import export:"
|
|
||||||
wc import-export/*.c import-export/*/*.c
|
|
||||||
wc import-export/*.c import-export/*/*.c |wc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "import export:"
|
|
||||||
wc import-export/*.h import-export/*/*.h
|
|
||||||
wc import-export/*.h import-export/*/*.h | wc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "import export:"
|
|
||||||
wc import-export/*.scm import-export/*/*.scm
|
|
||||||
wc import-export/*.scm import-export/*/*.scm | wc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "reports:"
|
|
||||||
wc report/*/*.c
|
|
||||||
wc report/*/*.c |wc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "reports:"
|
|
||||||
wc report/*/*.h
|
|
||||||
wc report/*/*.h |wc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "reports:"
|
|
||||||
wc report/*/*.scm
|
|
||||||
wc report/*/*.scm |wc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "scheme misc:"
|
|
||||||
wc scm/*.scm scm/*/*.scm
|
|
||||||
wc scm/*.scm scm/*/*.scm |wc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "Business:"
|
|
||||||
wc business/*/*.c
|
|
||||||
wc business/*/*.c |wc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "Business:"
|
|
||||||
wc business/*/*.h
|
|
||||||
wc business/*/*.h |wc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "Business:"
|
|
||||||
wc business/*/*.scm
|
|
||||||
wc business/*/*.scm | wc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "test:"
|
|
||||||
wc test-core/*.c */test/*.c */*/test/*.c */*/*/test/*.c
|
|
||||||
wc test-core/*.c */test/*.c */*/test/*.c */*/*/test/*.c |wc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "test:"
|
|
||||||
wc test-core/*.h */test/*.h */*/test/*.h */*/*/test/*.h
|
|
||||||
wc test-core/*.h */test/*.h */*/test/*.h */*/*/test/*.h |wc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "test:"
|
|
||||||
wc test-core/*.scm */test/*.scm */*/test/*.scm */*/*/test/*.scm
|
|
||||||
wc test-core/*.scm */test/*.scm */*/test/*.scm */*/*/test/*.scm |wc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo "internal docs"
|
|
||||||
wc README* */README* */*/README* */*/*/README* *.txt */*.txt */*/*.txt */*/*/*.txt doc/*.html doc/*/*.html doc/*.texinfo doc/*/*.texinfo doc/xml/*.dtd
|
|
||||||
wc README* */README* */*/README* */*/*/README* *.txt */*.txt */*/*.txt */*/*/*.txt doc/*.html doc/*/*.html doc/*.texinfo doc/*/*.texinfo doc/xml/*.dtd |wc
|
|
||||||
|
|
||||||
139
util/src-count/count.sh
Normal file
139
util/src-count/count.sh
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Simple stupid utility to count lines of code
|
||||||
|
# The output may deceive you, remember to subtract 1 from file count
|
||||||
|
|
||||||
|
#
|
||||||
|
# FIXME This script is very out of date. It doesn't count a number
|
||||||
|
# of source directories (such as gnome, ledger, engine,...)
|
||||||
|
#
|
||||||
|
|
||||||
|
SRC_DIR=$(dirname $0)/../../src
|
||||||
|
|
||||||
|
cd $SRC_DIR
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "app utils:"
|
||||||
|
wc $(find app-utils core-utils calculation gnc-module tax \
|
||||||
|
\( -regex '.*test[^/]*' -prune \) -o \
|
||||||
|
\( -path '*.svn' -prune \) -o \
|
||||||
|
\( \( -name '*.c' -o \
|
||||||
|
-name '*.h' -o \
|
||||||
|
-name '*.scm' \) -a \
|
||||||
|
-print \) | sort )
|
||||||
|
wc $(find app-utils core-utils calculation gnc-module tax \
|
||||||
|
\( -regex '.*test[^/]*' -prune \) -o \
|
||||||
|
\( -path '*.svn' -prune \) -o \
|
||||||
|
\( \( -name '*.c' -o \
|
||||||
|
-name '*.h' -o \
|
||||||
|
-name '*.scm' \) -a \
|
||||||
|
-print \) | sort ) | wc
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "import export:"
|
||||||
|
wc $(find import-export \
|
||||||
|
\( -regex '.*test[^/]*' -prune \) -o \
|
||||||
|
\( -path '*.svn' -prune \) -o \
|
||||||
|
\( \( -name '*.c' -o \
|
||||||
|
-name '*.h' -o \
|
||||||
|
-name '*.scm' \) -a \
|
||||||
|
-print \) | sort )
|
||||||
|
wc $(find import-export \
|
||||||
|
\( -regex '.*test[^/]*' -prune \) -o \
|
||||||
|
\( -path '*.svn' -prune \) -o \
|
||||||
|
\( \( -name '*.c' -o \
|
||||||
|
-name '*.h' -o \
|
||||||
|
-name '*.scm' \) -a \
|
||||||
|
-print \) | sort ) | wc
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "reports:"
|
||||||
|
wc $(find report \
|
||||||
|
\( -regex '.*test[^/]*' -prune \) -o \
|
||||||
|
\( -path '*.svn' -prune \) -o \
|
||||||
|
\( \( -name '*.c' -o \
|
||||||
|
-name '*.h' -o \
|
||||||
|
-name '*.scm' \) -a \
|
||||||
|
-print \) | sort )
|
||||||
|
wc $(find report \
|
||||||
|
\( -regex '.*test[^/]*' -prune \) -o \
|
||||||
|
\( -path '*.svn' -prune \) -o \
|
||||||
|
\( \( -name '*.c' -o \
|
||||||
|
-name '*.h' -o \
|
||||||
|
-name '*.scm' \) -a \
|
||||||
|
-print \) | sort ) | wc
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "scheme misc:"
|
||||||
|
wc $(find scm \
|
||||||
|
\( -regex '.*test[^/]*' -prune \) -o \
|
||||||
|
\( -path '*.svn' -prune \) -o \
|
||||||
|
\( \( -name '*.c' -o \
|
||||||
|
-name '*.h' -o \
|
||||||
|
-name '*.scm' \) -a \
|
||||||
|
-print \) | sort )
|
||||||
|
wc $(find scm \
|
||||||
|
\( -regex '.*test[^/]*' -prune \) -o \
|
||||||
|
\( -path '*.svn' -prune \) -o \
|
||||||
|
\( \( -name '*.c' -o \
|
||||||
|
-name '*.h' -o \
|
||||||
|
-name '*.scm' \) -a \
|
||||||
|
-print \) | sort ) |wc
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "Business:"
|
||||||
|
wc $(find business \
|
||||||
|
\( -regex '.*test[^/]*' -prune \) -o \
|
||||||
|
\( -path '*.svn' -prune \) -o \
|
||||||
|
\( \( -name '*.c' -o \
|
||||||
|
-name '*.h' -o \
|
||||||
|
-name '*.scm' \) -a \
|
||||||
|
-print \) | sort )
|
||||||
|
wc $(find business \
|
||||||
|
\( -regex '.*test[^/]*' -prune \) -o \
|
||||||
|
\( -path '*.svn' -prune \) -o \
|
||||||
|
\( \( -name '*.c' -o \
|
||||||
|
-name '*.h' -o \
|
||||||
|
-name '*.scm' \) -a \
|
||||||
|
-print \) | sort ) | wc
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "test:"
|
||||||
|
wc $(find . \( -path '*.svn' -prune \) -o \
|
||||||
|
\( -regex '.*/test.*/.*' -a \
|
||||||
|
\( -name '*.c' -o \
|
||||||
|
-name '*.h' -o \
|
||||||
|
-name '*.scm' \) -a \
|
||||||
|
-print \) | sort )
|
||||||
|
wc $(find . \( -path '*.svn' -prune \) -o \
|
||||||
|
\( -regex '.*/test.*/.*' -a \
|
||||||
|
\( -name '*.c' -o \
|
||||||
|
-name '*.h' -o \
|
||||||
|
-name '*.scm' \) -a \
|
||||||
|
-print \) | sort ) | wc
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo "internal docs"
|
||||||
|
wc $(find .. \( -path '*.svn' -prune \) -o \
|
||||||
|
\( -name 'README*' -o \
|
||||||
|
-name '*.txt' -o \
|
||||||
|
-name '*.html' -o \
|
||||||
|
-name '*.texinfo' -o \
|
||||||
|
-name '*.dtd' \) -a \
|
||||||
|
-print | sort )
|
||||||
|
wc $(find .. \( -path '*.svn' -prune \) -o \
|
||||||
|
\( -name 'README*' -o \
|
||||||
|
-name '*.txt' -o \
|
||||||
|
-name '*.html' -o \
|
||||||
|
-name '*.texinfo' -o \
|
||||||
|
-name '*.dtd' \) -a \
|
||||||
|
-print | sort ) | wc
|
||||||
|
|
||||||
|
cd -
|
||||||
Reference in New Issue
Block a user