大佬教程收集整理的这篇文章主要介绍了linux – 寻找更好的自动化工作环境的方法,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
#!/bin/bash declare -a repos=('repo1.git' 'repo2.git' 'repo3.git') err=0 err_sts() { if [ 0 -ne $? ]; then err=$1 echo above step Failed exiTing.. err code: $err exit $err fi } gclone() { echo path=$1 echo repo=$2 path=$1 repo=$2 echo "cd $hmdir" cd $hmdir echo "git clone $path/$repo" git clone $path/$repo } main() { echo enter the path to repos: read pth ls $pth err_sts 1 #path where you want your repos echo enter home dir for repos: read hmdir ls $hmdir err_sts 2 err=3 for ((i = 0; i < ${#repos[@]}; i++)) do echo "ls $pth/${repos[$i]}" ls $pth/${repos[$i]} err_sts $(($err + $i)) gclone $pth ${repos[$i]} done } main
以上是大佬教程为你收集整理的linux – 寻找更好的自动化工作环境的方法全部内容,希望文章能够帮你解决linux – 寻找更好的自动化工作环境的方法所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。