最近有个功能,是需要从在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

  

相关文章:

  • 2022-02-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2021-09-29
  • 2021-08-22
  • 2022-12-23
相关资源
相似解决方案