diff --git a/gitistics.sh b/gitistics.sh index e030b51..26ad577 100755 --- a/gitistics.sh +++ b/gitistics.sh @@ -4,7 +4,8 @@ REPODIR=$(pwd) # Regex or fixed name (brackets need to be escaped with a backslash) -REPOUSER="\(structix\|Janek\)" +REPOUSER=$(whoami) +#REPOUSER="\(structix\|Janek\)" # Specify the start date, where the statistics should be gathered STARTDATE="01 Jan 2018" @@ -117,12 +118,14 @@ print_usage() { echo "" echo "options:" echo "-h show this help page" + echo "-u set a repository username or a regex pattern (brackets etc. must be escaped with \ )" echo "-r set a directory with your repositories" echo "-v show verbose output" } -while getopts 'r:vh' flag; do +while getopts 'u:r:vh' flag; do case "${flag}" in + u) REPOUSER="${OPTARG}" ;; r) REPODIR="${OPTARG}" ;; v) VERBOSE=true ;; h) print_usage; exit 0 ;;