Created
October 3, 2022 16:46
-
-
Save cemdrman/d1940421a3af1056cda2b64af4a8625f to your computer and use it in GitHub Desktop.
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
#!/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