Last active
December 14, 2015 07:59
-
-
Save peichunting/5054983 to your computer and use it in GitHub Desktop.
从一个文本文件中读取要clone的github项目repository地址,按顺序clone到本地当前文件夹 以行为单位,每行一个github项目地址
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#clone git repository from a file that list all repository will to be clone. | |
read -p "Please input your file which contains git repository will be clone:" file | |
echo "your file is ${file}" | |
if [ -f ${file} ];then | |
while read line | |
do | |
echo "clone from ${line}" | |
git clone ${line} | |
done<${file} | |
else | |
echo "your file is not found" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment