Last active
August 29, 2015 13:57
-
-
Save nestoru/9690992 to your computer and use it in GitHub Desktop.
This file contains 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 -e | |
# /opt/scripts/svn-cat-tag-versions.sh | |
# @author: Nestor Urquiza | |
# @date: 20140319 | |
USAGE="Usage: `basename $0` <tag_base_url> <file_path> <version_from> <version_to>" | |
if [ $# -ne "4" ] | |
then | |
echo $USAGE | |
exit 1 | |
fi | |
tag_base_url=$1 | |
file_path=$2 | |
version_from=$3 | |
version_to=$4 | |
# one liner | |
svn ls $tag_base_url | \ | |
sort -t . -k 1,1 -k 2,2n -k 3,3n | \ | |
grep -A 1000000 "$version_from" | \ | |
grep -B 1000000 "$version_to" | \ | |
while read version ; do echo "/*****$version*****/"; svn cat $tag_base_url/$version/$file_path; echo; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment