直接上demo,简单易用,一看就懂,一用就会:
#!/bin/bash svninfo(){ toname="svnconf.txt" echo "请输入svn文件夹名称:" read dirname echo "请输入监听端口,如52440:" read port echo "请输入svn登录用户名:" read username echo "请输入svn登录密码:" read userpwd echo "请输入项目文件夹名称:" read project echo "dir:/svn/${dirname}/" > $toname echo "listen port ${port}" >> $toname echo "user:${username}" >> $toname echo "pwd:${userpwd}" >> $toname echo "projectDir:/www/wwwroot/${project}" >> $toname echo "创建svn目录中..." mkdir -p "/svn/${dirname}" echo "svn 目录创建完成,正在创建项目目录..." mkdir -p "/www/wwwroot/${project}" echo "项目目录创建完成" echo "移动配置中...." cp $toname "/svn/${dirname}" ls } svninfo
目的很明确,后面改成自动部署svn账户