首页 > 系统服务 > 详细

用shell脚本从git上拉取,项目目录下所有各个子项目代码

时间:2021-01-13 14:30:48      阅读:164      评论:0      收藏:0      [点我收藏+]
#!/usr/bin/env bash

dir=$(pwd)
ls | while read -r line; do
  fileDir=${dir}/$line
  if [ -d "$fileDir""/.git" ]; then
    echo "pull start ================$line====================="
    cd "$fileDir" && git pull
    echo "pull end ==================$line====================="
    echo -e "\n"
  fi
done

 

用shell脚本从git上拉取,项目目录下所有各个子项目代码

原文:https://www.cnblogs.com/yszr/p/14270914.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!