您的位置:首页 > 运维架构 > Shell

[Linux]A Shell to Export Source From SVN

2011-09-08 15:14 232 查看
#!/bin/bash

DIR_BASE=/home/developers/tony/
SVN_BASE=http://svn.designreactor.com/repos/CISCO_CEO/Cisco_CEO/tags
if [ "$#" != 1 ]
then
echo "Parameters error. 1 parameter is needed."
echo "Usage: deploy_stage.sh SVN_URL"
else
SVN_URL=$SVN_BASE/$1
DIR_PATH=$DIR_BASE/$1
echo $SVN_URL
svn export "$SVN_URL" "$DIR_PATH"
cd "$DIR_PATH"
ant -f build_stage.xml
fi


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!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息