[Linux]A Shell to Export Source From SVN

来源:互联网 发布:房屋租赁软件 编辑:程序博客网 时间:2024/06/15 20:02


#!/bin/bashDIR_BASE=/home/developers/tony/SVN_BASE=http://svn.designreactor.com/repos/CISCO_CEO/Cisco_CEO/tagsif [ "$#" != 1 ]thenecho "Parameters error. 1 parameter is needed."echo "Usage: deploy_stage.sh SVN_URL"elseSVN_URL=$SVN_BASE/$1DIR_PATH=$DIR_BASE/$1echo $SVN_URLsvn export "$SVN_URL" "$DIR_PATH"cd "$DIR_PATH"ant -f build_stage.xmlfi




At first, I use PATH, system point out svn:  command not found, and actually PATH is PATH of environment, so I use DIR_PATH instead of PATH, it works very well now!

原创粉丝点击