[root@lamp ~]# cat svncreate.sh 
#!/bin/bash
cd /ec-channels
echo "当前目录是:`/bin/pwd`"
read -p "请输入要新建的SVN:"  -t 20 svn
read -p "请输入给SVN权限的组(web、php、all):" -t 20 zu
#stty -echo
#read -p "请输入您的密码:" -t 10 mima
#stty echo
if [ -d $svn ];then
echo "Directory already exists"
else
/usr/local/svn/bin/svnadmin create $svn
fi
/bin/cp /ec-channels/svnserve.conf /ec-channels/$svn/conf/
/bin/cp /ec-channels/ceshi.sh /usr/local/sbin/$svn.sh
/bin/echo ssh -p 60022 root@192.168.1.170 /usr/local/bin/svn update  /home/wwwroot/$svn > /usr/local/sbin/$svn.sh
/bin/cp  /ec-channels/post-commit  /ec-channels/$svn/hooks/
/bin/echo /usr/local/sbin/$svn.sh >> /ec-channels/$svn/hooks/post-commit
/bin/chown daemon.daemon /ec-channels/$svn/ -R
/bin/echo $svn   IN A 192.168.1.170 >> /var/named/named.ecsp
/usr/local/bind972/sbin/rndc reload
/bin/echo  >> /usr/local/password/authz.conf
/bin/echo [$svn:/] >> /usr/local/password/authz.conf
/bin/echo @admin = rw >> /usr/local/password/authz.conf
case $zu in
web)
/bin/echo @webd = rw >> /usr/local/password/authz.conf
/bin/echo "请确认已经添加PHP组权限?(php)"
;;
php)
/bin/echo @phpd = rw >> /usr/local/password/authz.conf
/bin/echo "请确认已经添加web组权限?(web)"
;;
all)
/bin/echo @webd = rw >> /usr/local/password/authz.conf
/bin/echo @phpd = rw >> /usr/local/password/authz.conf
/bin/echo "web and php is areadly insert into authz.conf"
/bin/echo "you don't have to do any operation!"
;;
esac

具体含义做自动化运维的应该都看得懂哈,分享一下,脚本简单,便捷