diff options
Diffstat (limited to 'pre-run.sh')
-rw-r--r-- | pre-run.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pre-run.sh b/pre-run.sh new file mode 100644 index 0000000..aeec8f5 --- /dev/null +++ b/pre-run.sh @@ -0,0 +1,17 @@ +#! /bin/sh +# Do these before final testing, *not* just before pushing: +# Philip Sargent 2020/06/20 +python reset-django.py +echo After cleanup deletion, remake all migrations. +python manage.py makemigrations >/dev/null +python manage.py test +echo Run inspectdb: +python manage.py inspectdb > troggle-inspectdb.py +# egrep -in "unable|error" 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 \*.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 +echo `tail -1 lines-of-python.txt` non-comment lines of python. |