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

#!/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上拉取,项目目录下所有各个子项目代码

上一篇:Ubuntu制作系统服务时服务程序需要root权限


下一篇:linux 启动 jmeter 报 No X11 DISPLAY variable was set, but this program performed an operation which requires it