Skip to content

Instantly share code, notes, and snippets.

@matthutchinson
Last active July 27, 2016 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthutchinson/66fec554a26c80696c7cffb5ad664fc6 to your computer and use it in GitHub Desktop.
Save matthutchinson/66fec554a26c80696c7cffb5ad664fc6 to your computer and use it in GitHub Desktop.
clone github repos and zip them
#!/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