#!/bin/bash
#The script for svn
#Written by yingzi234
yum -y install subversion
echo "show your svn version information"
svnserve --version
mkdir /svndata
echo "You can create a document as test"
echo "Input your document'name :" #The document located /svndata
read answer
svnadmin create /svndata/$answer
echo "modify your svn conf dney anonymous "
sed -i 's/^# anon-access = read/anon-access = none/g' /svndata/$answer/conf/svnserve.conf
sed -i 's/^# password-db = passwd/password-db = passwd/g' /svndata/$answer/conf/svnserve.conf
echo "You can add svn user "
echo "Type your svn user  name:"
read name
echo "Type your svn user password"
read password
echo "$name = $password ">>/svndata/$answer/conf/passwd
svnserve -d -r /svndata
echo "You svn document is /svndata/*"