-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcount.sh
executable file
·58 lines (45 loc) · 1.02 KB
/
count.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
#
# Usage:
# ./count.sh <function name>
set -o nounset
set -o pipefail
set -o errexit
source common.sh
python-build-scripts() {
pushd $PY27
# 1849 lines of input
echo DATA
wc -l Modules/Setup.dist Modules/config.c.in pyconfig.h.in
echo
# 9K lines of code!
echo SOURCE CODE
wc -l setup.py Makefile.pre.in configure.ac Modules/makesetup #Doc/Makefile
echo
echo MODULES
{ echo Modules/zlib/Makefile.in
find Modules/_ctypes -name 'Makefile.am'
} | xargs wc -l
echo
# 19K lines of output!
echo GENERATED
wc -l Makefile configure Modules/config.c pyconfig.h
echo
echo WINDOWS
wc -l PCbuild/*.bat #PCbuild/*.vcxproj*
echo
echo MAC
find Mac/ -name '*Makefile*' | xargs wc -l
echo
popd
}
# NOTE: Almost all of this is Modules/ and Lib/. Batteries included.
python-source() {
echo 'Number of Python source files'
git ls-files $PY27 | wc -l
echo
echo 'Number of core Python source files'
git ls-files $PY27/{Python,Include,Objects,Parser,Grammar} | wc -l
echo
}
"$@"