Created
February 4, 2011 09:43
-
-
Save flooose/810930 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # update the local repositories if needed | |
| if [ $REPOSITORIES ]; then | |
| echo "Updating local repositories" | |
| for REPOSITORY in `ls ${REPOSITORIES}`; do | |
| echo "${REPOSITORY}: " | |
| ( cd ${REPOSITORIES}/$REPOSITORY; git clean -fdx; git pull; git reset --hard HEAD ) | |
| done | |
| echo "Done updating `ls ${REPOSITORIES} | wc -l` local repositories" | |
| else | |
| echo 'You need to specify the $REPOSITORIES environment-variable.' | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment