Skip to content

Instantly share code, notes, and snippets.

@bradlucas
Created June 17, 2017 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradlucas/ededa49eb454ac8c03881833e7e0de8b to your computer and use it in GitHub Desktop.
Save bradlucas/ededa49eb454ac8c03881833e7e0de8b to your computer and use it in GitHub Desktop.
get-all-local-repos-authors.sh
#!/bin/bash
echo ""
printf "| %-55s | %-40s | \n" "-------------------------------------------------------" "----------------------------------------";
printf "| %-55s | %-40s | \n" "Repo" "Author";
printf "| %-55s | %-40s | \n" "-------------------------------------------------------" "----------------------------------------";
for d in `find . -name .git -type d`; do
pushd $d/.. > /dev/null;
# do something only if there is a .git directory
if [[ -d ".git" ]]
then
AUTHOR_EMAIL=`(get-repo-first-author.sh)`
REPO_NAME=`basename ${PWD}`;
printf "| %-55s | %-40s | \n" $REPO_NAME $AUTHOR_EMAIL;
fi
popd > /dev/null;
done
printf "| %-55s | %-40s | \n" "-------------------------------------------------------" "----------------------------------------";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment