Skip to content

Instantly share code, notes, and snippets.

@peichunting
Last active December 14, 2015 07:59
Show Gist options
  • Save peichunting/5054983 to your computer and use it in GitHub Desktop.
Save peichunting/5054983 to your computer and use it in GitHub Desktop.
从一个文本文件中读取要clone的github项目repository地址,按顺序clone到本地当前文件夹 以行为单位,每行一个github项目地址
#!/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