Skip to content

Instantly share code, notes, and snippets.

@leonmwandiringa
Created April 15, 2019 21:26
Show Gist options
  • Save leonmwandiringa/e93a595d7bed21275f8903c855da065c to your computer and use it in GitHub Desktop.
Save leonmwandiringa/e93a595d7bed21275f8903c855da065c to your computer and use it in GitHub Desktop.
#!/bin/bash
REPOSITORIES=(DNC-DShop DNC-DShop.Api DNC-DShop.Api.Next DNC-DShop.Common DNC-DShop.Services.Customers DNC-DShop.Services.Identity DNC-DShop.Services.Notifications DNC-DShop.Services.Operations DNC-DShop.Services.Orders DNC-DShop.Services.Products DNC-DShop.Services.Signalr)
if [ "$1" = "-p" ]
then
echo ${REPOSITORIES[@]} | sed -E -e 's/[[:blank:]]+/\n/g' | xargs -I {} -n 1 -P 0 sh -c 'printf "========================================================\nCloning repository: {}\n========================================================\n"; git clone https://github.com/devmentors/{}.git'
else
for REPOSITORY in ${REPOSITORIES[*]}
do
echo ========================================================
echo Cloning repository: $REPOSITORY
echo ========================================================
REPO_URL=https://github.com/devmentors/$REPOSITORY.git
git clone $REPO_URL
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment