Created
March 31, 2013 08:44
-
-
Save harrisony/5280018 to your computer and use it in GitHub Desktop.
A quickly hacked up script to update folders from VCS
This file contains 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 | |
find $1 -mindepth 1 -maxdepth 1 -type d | while read -r dir | |
do | |
pushd "$dir" | |
echo $dir | |
if [[ -d ".git" ]]; then | |
git pull | |
fi | |
if [[ -d ".hg" ]]; then | |
hg pull | |
fi | |
if [[ -d ".svn" ]]; then | |
svn update | |
fi | |
popd | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment