Last active
July 27, 2016 13:57
-
-
Save matthutchinson/66fec554a26c80696c7cffb5ad664fc6 to your computer and use it in GitHub Desktop.
clone github repos and zip them
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 | |
filecontent=( `cat "repo_list" `) | |
for repo in "${filecontent[@]}" | |
do | |
echo $repo " - cloning ..." | |
git clone -q git@github.com:$repo | |
done | |
echo "zipping all repos ..." | |
for folder in ./* ; do | |
if [ -d "$folder" ]; then | |
zip -qr ./$folder.zip $folder | |
echo $folder "👍🏻" | |
rm -rf $folder | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment