-
-
Save femyeda/572fdf4f6d091f8fda28 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage ./images.sh optional-start-sha optional-end-sha | |
# ./images.sh eaa1d00b24008f590b95ad099241b4003688cdda HEAD | |
if [ $1 ]; then | |
start="$1.." | |
else | |
start="" | |
fi | |
if [ $2 ]; then | |
end="$2" | |
else | |
end="HEAD" | |
fi | |
emails=(`git log --format='%ae' $start$end | sort -u`) | |
count=0 | |
while [ "x${emails[count]}" != "x" ] | |
do | |
email=${emails[$count]} | |
email=$email | tr -d ' ' | tr '[:upper:]' '[:lower:]' | |
output=($(md5 -s "$email")); | |
output=${output[3]} | |
echo "<img src=\"http://gravatar.com/avatar/$output\">" | |
count=$(( $count + 1 )) | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment