Created
January 5, 2018 05:48
-
-
Save brunosaboia/ecd99f816f24c9b236a6a2b4c14bdf7c to your computer and use it in GitHub Desktop.
Bash one-liner script to clone all repos from a Bitbucket team
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
for repo in $(curl -u {username} --raw https://api.bitbucket.org/1.0/users/{team} | sed -r 's/("name": )/\n\1/g' | sed -r 's/"name": "(.*)"/\1/' | sed -e 's/{//' | cut -f1 -d\" | tr '\n' ' '); do git clone git@bitbucket.org:{team}/$repo.git; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment