Created
August 13, 2011 14:34
-
-
Save gpakosz/1143906 to your computer and use it in GitHub Desktop.
Bulk update of SVN and Git repositories located under a common top level directory
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
#!/bin/sh | |
echo updating svn repositories | |
find . -type d -exec test -d '{}'/.svn.disabled \; -prune -o -exec test -d '{}'/.svn \; -prune -exec sh -c "echo updating {} && svn cleanup {} && svn update --non-interactive --trust-server-cert {}" \; | |
echo updating git repositories | |
find . -type d -exec test -d '{}'/.git \; -prune -exec sh -c "echo updating {} && cd {} && git clean -xdf && git pull" \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment