Skip to content

Instantly share code, notes, and snippets.

@cemdrman
Created October 3, 2022 16:46
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 cemdrman/d1940421a3af1056cda2b64af4a8625f to your computer and use it in GitHub Desktop.
Save cemdrman/d1940421a3af1056cda2b64af4a8625f to your computer and use it in GitHub Desktop.
#!/bin/bash
team1=("repo1" "repo2")
team2=("repo3" "repo4")
echo 'Enter your git user name:'
read user_name
echo 'Enter your team name (team1 - team2):'
read team_name
git_repo=()
case "$team_name" in
"team1") git_repo=${team1[@]}
;;
"team2") git_repo=${team2[@]}
;;
esac
mkdir -p ~/git_workspace
cd ~/git_workspace
for repo in ${git_repo[@]}
do
git clone "https://$user_name@bitbucket.org/$repo.git"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment