#!/bin/bash CUR_DIR=$(pwd) GIT_USER="JA Samitier" report="# Git report from last week\n" printf "Generating git report...\n\n" repos=$(find . -name ".git" | cut -c 3-) for i in $repos; do cd "$i"; cd ..; current_report=`git log --author="$GIT_USER" --format="- %aI %B" --since=-7days --reverse` [ -z "$current_report" ] || report="${report}\n## ${i/\/\.git/}\n${current_report}\n"; cd $CUR_DIR done printf "$report\n";