cjwirth / awesome-ios-ui

A curated list of awesome iOS UI/UX libraries
11.13k stars 1.35k forks source link

How to clone all git repositories? #57

Closed Wang-Jong closed 6 years ago

Wang-Jong commented 6 years ago

I want to clone all iOS UI/UX libraries (git repositories) contained in this repository automatically. How can I do it? Any help would be appreciated. Thanks.

charlymr commented 6 years ago

Open terminal, go to the folder for all your repo and paste this:

mkdir awesome-ios-ui
cd awesome-ios-ui

curl https://raw.githubusercontent.com/cjwirth/awesome-ios-ui/master/README.md \
| grep -Eo "((https)://github.com/[a-zA-Z0-9./?=_-]*/[a-zA-Z0-9./?=_-]*/)" \
| sort | uniq  | xargs -n 1 git clone
Wang-Jong commented 6 years ago

It works! Thanks, charlymr. May I ask you one more? Is there any way to download all projects instead of git cloning by its index-structure?

charlymr commented 6 years ago

What you ask is too much more complicated as the Download URL for each repo is not available on the readme page, so the regex won't do to extract the git repo URLs.

You could add a lin in your script to clean up all git references after:

mkdir awesome-ios-ui
cd awesome-ios-ui

curl https://raw.githubusercontent.com/cjwirth/awesome-ios-ui/master/README.md \
| grep -Eo "((https)://github.com/[a-zA-Z0-9./?=_-]*/[a-zA-Z0-9./?=_-]*/)" \
| sort | uniq  | xargs -n 1 git clone

### Be careful with this as we assume we are in the directory awesome-ios-ui
rm -rf */.git*
Wang-Jong commented 6 years ago

I see. Thank you for your kind explanation.