创建svn仓库脚本

#!/bin/bash
svnadmin create $1
cp /home/svndata/conf/svnserver.conf /home/svndata/$1/conf/svnserve.conf
echo "">>/home/svndata/conf/authz
echo [$1:/]>>/home/svndata/conf/authz
echo "svnadmin = rw">>/home/svndata/conf/authz

rm -rf /home/svndata/tmp
mkdir /home/svndata/tmp
cd /home/svndata/tmp
echo yes|svn co svn://127.0.0.1/$1 --username svnadmin --password svnadmin
cd /home/svndata/tmp/$1
svn mkdir DAEMON
svn mkdir DEMO
svn mkdir DOCS
svn mkdir WEB
svn mkdir SCRIPT
svn mkdir SCRIPT/trunk
svn mkdir SCRIPT/tags
svn mkdir SCRIPT/branches
svn mkdir WEB/RELEASE
svn mkdir WEB/SOURCE
svn mkdir WEB/SOURCE/branches
svn mkdir WEB/SOURCE/tags
svn mkdir WEB/SOURCE/trunk
svn commit -m svnadmin

vim /home/svndata/conf/authz

posted @ 2015-07-28 16:15  wardensky  阅读(367)  评论(0编辑  收藏  举报