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

时间:2021-01-13 14:30:48   收藏:0   阅读:164
#!/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

 

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!