#!/bin/bash total_commits=$(git shortlog -s -n --no-merges | awk '{ sum += $1; } END { print sum; }' "$@") if [[ $total_commits -gt 200 ]]; then echo "Total commits: $total_commits (minimum required commits reached)" else echo "Total commits: $total_commits ($(expr 200 - $total_commits) commits left to reach minimum required commits)" fi echo "Commits per user:" git shortlog -s -e --no-merges | sed 's///' | awk '{ printf "\t%s (%s): %s\n", $2, $3, $1 }'