Last active
February 23, 2016 11:43
-
-
Save lorello/b0b13eb9aaeeecf4c566 to your computer and use it in GitHub Desktop.
SVN Repository Report
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 | |
| # | |
| # Create a simple CSV report with relevant info about | |
| # your old SVN repositories, so you can easly decide | |
| # what archive offline and what migrate to GIT :) | |
| # | |
| REPO_ROOT=/var/svn/ | |
| REPOS=$(find $REPO_ROOT -mindepth 1 -maxdepth 1 -type d) | |
| echo "name,size,last commit date,last commit author" | |
| for REPO in $REPOS; do | |
| REPO_NAME=$(basename $REPO) | |
| REPO_SIZE=$(du -cs $REPO | head -1 | awk '{ print $1 }') | |
| LAST_DATE=$(svnlook date $REPO | head -1 | awk '{ print $1 }') | |
| LAST_AUTHOR=$(svnlook author $REPO) | |
| echo "$REPO_NAME,$REPO_SIZE,$LAST_DATE,$LAST_AUTHOR" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment