Skip to content

Instantly share code, notes, and snippets.

@rafaelbrandao
Created February 21, 2013 04:41
Show Gist options
  • Save rafaelbrandao/5002126 to your computer and use it in GitHub Desktop.
Save rafaelbrandao/5002126 to your computer and use it in GitHub Desktop.
echo "Checking summary for r$1..."
svn diff --summarize -c $1 > /tmp/patch
cat /tmp/patch | grep .$2 > /tmp/patch2
if [ $3 ]; then
cat /tmp/patch2 | grep $3 > /tmp/patch3;
mv /tmp/patch3 /tmp/patch2
fi
echo "Num of modified files (.$2): `cat /tmp/patch2 | wc -l`"
echo " * Deleted: `cat /tmp/patch2 | grep --regex='^D' | wc -l`"
echo " * Modified: `cat /tmp/patch2 | grep --regex='^M' | wc -l`"
echo " * Added: `cat /tmp/patch2 | grep --regex='^A' | wc -l`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment