Super Useful Script - Clone All Git Repos From A User

Post Reply
User avatar
TheReaperKing
Member
Posts: 531
Joined: Sun Nov 22, 2015 21:36
Contact:

Super Useful Script - Clone All Git Repos From A User

by TheReaperKing » Post

I wanted to download all the great mods from the minetest-mods repo section on github but it would have taken forever to individually clone them all. After a lot of trial and failure I finally found a nice script to do all that cloning for me! If you want to clone all of a users repos you just change the username in the script. I believe this works on both Windows and Linux and maybe Mac too. I tested it on Linux.

Just put this code in a text file and rename the extension .sh for Linux and .bat for Windows

Code: Select all

USER=minetest-mods; PAGE=2
curl "https://api.github.com/users/$USER/repos?page=$PAGE&per_page=100" |
  grep -e 'git_url*' |
  cut -d \" -f 4 |
  xargs -L1 git clone 
Caution: This script has made me go power/download crazy and my HD is quickly filling up with tons of awesome modders mods so be warned!

I hope someone finds this useful and have a great day!
-Mike
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids

User avatar
TheReaperKing
Member
Posts: 531
Joined: Sun Nov 22, 2015 21:36
Contact:

Re: Super Useful Script - Clone All Git Repos From A User

by TheReaperKing » Post

Just a little update to the script, for minetest-mods PAGE had to be set to 2 instead of 1 because there are over 100 repos.
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests