Created
October 16, 2012 15:10
-
-
Save joyrexus/3899861 to your computer and use it in GitHub Desktop.
Three shell functions for subversion repo management
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
# Three little shell functions of use when managing | |
# subversion repos. | |
# | |
# nosvn - remove a directory from revision control | |
# svnrev - print repo rev number | |
# startsvn - start the subversion daemon | |
# Remove directory from revision control | |
nosvn () { | |
DIR=${1:-"."} | |
if [ ! -d $DIR ]; then | |
echo "You need to specify a directory"; | |
break | |
fi | |
read -e -p "Remove $DIR from revision control? (y/n): " CHOICE | |
if [ $CHOICE == "y" ]; then | |
find $DIR -name ".svn" -print0 | xargs -0 rm -Rf | |
fi | |
} | |
# Print repo revision number | |
svnrev () { | |
svn info $1 | awk '/Rev:/ { sub(/.*: /, ""); print }' | |
} | |
# Start the subversion server | |
svnstart () { | |
svnserve -d -r $SVN_REPOS --listen-port=3690 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment