Skip to content

Instantly share code, notes, and snippets.

@andypotanin
Created July 16, 2013 22:14
Show Gist options
  • Save andypotanin/6015659 to your computer and use it in GitHub Desktop.
Save andypotanin/6015659 to your computer and use it in GitHub Desktop.
# List Repositories
REPOSITORIES="abstract object-settings object-validation elastic-client"
# Define target path
DIRECTORY="/Cloud"
# Set Github User
USER="UsabilityDynamics"
for NAME in `echo $REPOSITORIES`
do
if [ -s "$DIRECTORY/$NAME" ]
then
echo "Pulling $name repository into $DIRECTORY/$NAME..."
cd "$DIRECTORY/$NAME"
git pull
else
echo "Cloning https://github.com/$NAME repository into $DIRECTORY/$NAME..."
git clone "https://github.com/$USER/$NAME" "/$DIRECTORY/$NAME"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment