git-clone-bulk.sh (534B)
1 #!/bin/sh 2 # description: clone a set of git repos to current directory - use sh substitution (rep{1,2,3}) for repos that share hosts 3 # ARGUMENTS: git-clone-bulk repo1 repo2 repo3 ... 4 # DEPENDENCIES: git 5 6 if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then 7 echo "Usage: git-clone-bulk REPO..." 8 echo "" 9 echo "'git clone' multiple repos in one call. REPO should be a list of git repositories to clone" 10 echo "bash expansion is useful here: 'git-clone-bulk github.com/user/{repo1,repo2}" 11 exit 12 fi 13 14 for repo in $@; do git clone $repo; done