summaryrefslogtreecommitdiffstats
path: root/pre-run.sh
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2020-06-20 19:55:23 +0100
committerPhilip Sargent <philip.sargent@klebos.com>2020-06-20 19:55:23 +0100
commit77c80d1a69105a2419d6c2f64b46a4bb57f91b96 (patch)
tree2fd1089e3079cb6b04e229386f3bdc0ed98d1bd4 /pre-run.sh
parentf608fc186eb6fd68cf69258c000c0500838e1b26 (diff)
downloadtroggle-77c80d1a69105a2419d6c2f64b46a4bb57f91b96.tar.gz
troggle-77c80d1a69105a2419d6c2f64b46a4bb57f91b96.tar.bz2
troggle-77c80d1a69105a2419d6c2f64b46a4bb57f91b96.zip
remove in-memory phase of data import
Diffstat (limited to 'pre-run.sh')
-rw-r--r--pre-run.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/pre-run.sh b/pre-run.sh
index 08a5d31..d938304 100644
--- a/pre-run.sh
+++ b/pre-run.sh
@@ -7,9 +7,9 @@ python manage.py inspectdb > troggle-inspectdb.py
echo ""
# count non-blank lines of python and template HTML code
# includes all variants of settings.py files
-find . -name \*.html -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v "0$" | awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-templates.txt
+find . -name \*.html -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-templates.txt
-find . -name \*.py -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v "0$" | awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-python.txt
+find . -name \*.py -print0 | xargs -0 egrep -vc "#|^\s*$" | grep -v ":0$" | grep -v "/migrations/" |grep -v "troggle-inspectdb.py"| awk -F ":" '{ sum +=$2; print $2, $1; } END {print sum}'| sort -n > lines-of-python.txt
echo `tail -1 lines-of-python.txt` non-comment lines of python.
# This deletes the database so must run after generating troggle-inspectdb.py