11#! /usr/bin/env bash
22
3+ re_ignore=' .*(build|dist|venv|old|other|scripts|node|static).*'
4+
35echo -n " Lines of code (excluding test): "
4- files=$( find | egrep ' \.(py|js|vue)$' | egrep -v ' .*(build|dist|venv|old|other|scripts|node|static).* ' | grep -v ' test' )
6+ files=$( find | egrep ' \.(py|js|ts|rs| vue)$' | egrep -v $re_ignore | grep -v ' test' )
57echo $files | xargs cat | wc -l
68
79# echo "Files:"
@@ -10,17 +12,21 @@ echo $files | xargs cat | wc -l
1012# done
1113
1214echo -n " - of which Python code: "
13- files=$( find | egrep ' \.(py)$' | egrep -v ' .*(build|dist|venv|old|other|scripts|node|static).*' | grep -v ' test' )
15+ files=$( find | egrep ' \.(py)$' | egrep -v $re_ignore | grep -v ' test' )
16+ echo $files | xargs cat | wc -l
17+
18+ echo -n " - of which Rust code: "
19+ files=$( find | egrep ' \.(rs)$' | egrep -v $re_ignore | grep -v ' test' )
1420echo $files | xargs cat | wc -l
1521
16- echo -n " - of which JS code: "
17- files=$( find | egrep ' \.(js)$' | egrep -v ' .*(build|dist|venv|old|other|scripts|node|static).* ' | grep -v ' test' )
22+ echo -n " - of which JS/TS code: "
23+ files=$( find | egrep ' \.(js|ts )$' | egrep -v $re_ignore | grep -v ' test' )
1824echo $files | xargs cat | wc -l
1925
2026echo -n " - of which Vue code: "
21- files=$( find | egrep ' \.(vue)$' | egrep -v ' .*(build|dist|venv|old|other|scripts|node|static).* ' | grep -v ' test' )
27+ files=$( find | egrep ' \.(vue)$' | egrep -v $re_ignore | grep -v ' test' )
2228echo $files | xargs cat | wc -l
2329
2430echo -ne " \nLines of test: "
25- files=$( find | egrep ' \.(py|js|vue)$' | egrep -v ' .*(build|dist|venv|old|other|scripts|node|static).* ' | grep ' test' )
31+ files=$( find | egrep ' \.(py|js|vue)$' | egrep -v $re_ignore | grep ' test' )
2632echo $files | xargs cat | wc -l
0 commit comments