A simple script to download repos from bitbucket (mostly) and github. If the repository already exists the repository will just be updated if possible via git pull.
- GitHub CLI installed and configured to access your repositories
sh github.sh <desired clone path>
sh github.sh ~/work/github_repos
During the execution the script will pause to allow for editing of the list of repositories to clone. Often with large organizations is possible to have quite a large number of repositories to clone, which is most of the times unwanted.
Also, if the you already run the script the script will prompt whether you want to just keep reading from the existing list file so that the script will just attempt updating of those repositories.
The script will create folders per each organization and username, under which the repositories will be cloned.
jq: [https://stedolan.github.io/jq/]
bitbucket.sh username:password
it will create a bitbuckt_repos folder above the script itself and a number of subfolders depending on your own bitbucket structure. Inside each folder your repos are going to be cloned.
Inspired by this: [https://stackoverflow.com/questions/40429610/bitbucket-clone-all-team-repositories]