Created
July 18, 2017 16:52
-
-
Save werm098/188e2aac82c6b5369e15f9ba2d112726 to your computer and use it in GitHub Desktop.
Simple bash function to log SVN commit messages for the day
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
function svnlog() { | |
local hoursAgo=12 | |
if [ "$1" ]; then | |
hoursAgo=$1 | |
fi | |
local dateThen=$(date -v-"$hoursAgo"H "+%Y-%m-%d %H:%M:%S") | |
local dateNow=$(date "+%Y-%m-%d %H:%M:%S") | |
echo "SVN LOG: $(date "+%Y-%m-%d")" | |
svn log --search "{{ SVN username }}" -r "{$dateThen}:{$dateNow}" {{ SVN URL }} \ | |
| grep -v -e "| {{ SVN username }} |" -e "^br$" -e "^$" -e "-----" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment