Add line count history helper scripts ##ci

This commit is contained in:
Sergi Àlvarez i Capilla 2022-07-07 13:25:22 +02:00
parent ba6c067ccc
commit 1914cdc432
2 changed files with 17 additions and 0 deletions

View File

@ -1,4 +1,5 @@
#!/bin/sh
# alias locdiff='echo $((`git diff |grep ^+ | wc -l`-`git diff |grep ^- | wc -l`))'
#A=`hg diff $@ | grep -v '+++' | grep ^+ |wc -l`
#B=`hg diff $@ | grep -v -- '---' | grep ^- |wc -l`
A="$(git diff "$@" | grep -v '+++' | grep -c ^+)"

16
sys/lochist Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
TAGS=`git tag| grep -e '^\d\..\.' | grep -v '\d-'`
control_c() {
echo "^C"
rm -rf r2loc
exit 1
}
trap control_c 2
rm -rf r2loc
git clone -q . r2loc || exit 1
for a in $TAGS ; do
(cd r2loc && git checkout -q $a)
printf "$a "
find r2loc/libr r2loc/binr -type f -iname '*.c'|xargs cat |wc -l
done
rm -rf r2loc