Added -s <date> flag
This commit is contained in:
@@ -8,7 +8,7 @@ REPOUSER=$(whoami)
|
||||
#REPOUSER="\(structix\|Janek\)"
|
||||
|
||||
# Specify the start date, where the statistics should be gathered
|
||||
STARTDATE="01 Jan 2018"
|
||||
STARTDATE="1 year ago"
|
||||
|
||||
# Verbose flag
|
||||
VERBOSE=false
|
||||
@@ -102,7 +102,7 @@ function main() {
|
||||
|
||||
|
||||
echo "-------------------------"
|
||||
echo "Total commits since $STARTDATE: $commitcounter"
|
||||
echo "Total commits starting from $STARTDATE: $commitcounter"
|
||||
echo "Total files changed: $totalfiles"
|
||||
echo "Total insertions: $totalinsertions"
|
||||
echo "Total deletions: $totaldeletions"
|
||||
@@ -119,14 +119,16 @@ print_usage() {
|
||||
echo "-h show this help page"
|
||||
echo "-u <user/regex> set a repository username or a regex pattern (brackets etc. must be escaped with \ )"
|
||||
echo "-r <directory> set a directory with your repositories"
|
||||
echo "-s <date> set the date (e.g. 01 JAN 2018) where the stats should start"
|
||||
echo "-v show verbose output"
|
||||
}
|
||||
|
||||
# process the arguments
|
||||
while getopts 'u:r:vh' flag; do
|
||||
while getopts 'u:r:s:vh' flag; do
|
||||
case "${flag}" in
|
||||
u) REPOUSER="${OPTARG}" ;;
|
||||
r) REPODIR="${OPTARG}" ;;
|
||||
s) STARTDATE="${OPTARG}" ;;
|
||||
v) VERBOSE=true ;;
|
||||
h) print_usage; exit 0 ;;
|
||||
*) print_usage
|
||||
|
Reference in New Issue
Block a user