Added shell script
This commit is contained in:
33
gitistics.sh
Executable file
33
gitistics.sh
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Specify a directory with all Git repositories
|
||||||
|
REPODIR=~/Git
|
||||||
|
|
||||||
|
# Specify the start date, where the statistics should be gathered
|
||||||
|
STARTDATE='01 Jan 2018'
|
||||||
|
|
||||||
|
# --------------------
|
||||||
|
|
||||||
|
# Switch into the REPODIR
|
||||||
|
pushd $REPODIR
|
||||||
|
|
||||||
|
# Iterate over all subdirectories
|
||||||
|
for dir in $REPODIR/*/
|
||||||
|
do
|
||||||
|
dir=${dir%*/}
|
||||||
|
echo ${dir##*/}
|
||||||
|
|
||||||
|
# enter directory
|
||||||
|
cd ${dir##*/}
|
||||||
|
|
||||||
|
# show amount of commits of all users
|
||||||
|
git shortlog -sne --all --since="01 Jan 2018"
|
||||||
|
|
||||||
|
|
||||||
|
# go back
|
||||||
|
cd ..
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# Switch back to the original directory state
|
||||||
|
popd
|
Reference in New Issue
Block a user