Commit 5661c667 authored by System Administrator's avatar System Administrator Committed by Vitaly Lipatov

commit check_git_activity.sh

parent b5fc992b
#!/bin/bash
if [ $1 = '-h' -o $1 = '--help' ]
then
echo "Use 'check_git_actvity.sh 1000' to see the git's who have at least 1000 changes. Without arguments it lists all git's with their amounts of changed/delited/created files."
exit 0
fi
cd /azbyka
LIST=$(find ./azbyka_* -maxdepth 6 -name '.git')
T=0
[ $1 -gt 0 ] && T=$1
for i in $LIST
do
cd /azbyka/$i
cd ..
FILES="$(git status --porcelain)"
M=$(echo "$FILES"|grep -c ' M ')
D=$(echo "$FILES"|grep -c ' D ')
Q=$(echo "$FILES"|grep -c '?? ')
ALL=$(echo -n "$FILES"|grep -c '')
if [ $ALL -ge $T ]
then
echo "$(basename $(pwd)) - $ALL changes: $M modified, $D deleted, $Q created"
fi
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment