使用shell脚本实现在liunx上进行svn的上传下载更新功能

最近有个功能,是需要从在liunx上拉取svn地址,并创建一个新文件进行提交,shell脚本如下

#!/bin/bash
echo "Hello World !"
myFile="wms"
#这里的-x 参数判断$myPath是否存在并且是否具有可执行权限
if [ ! -d "/uitest"]; then
  svn checkout http://svn.egomsl.com/svn/repos/autotest.globalegrow.com/projectScript/uitest
else
cd $PWD/uitest
fi
echo "the file path for" $PWD
#先更新项目
svn update
#创建项
if [ ! -d "$myFile" ]; then
 mkdir $myFile
fi
#增加项目
svn add $myFile
#上传项目
svn commit -m "crate file $myFile" $myFile

  

原文地址:https://www.cnblogs.com/chongyou/p/8253577.html