Skip to content

Instantly share code, notes, and snippets.

@harrisony
Created March 31, 2013 08:44
Show Gist options
  • Save harrisony/5280018 to your computer and use it in GitHub Desktop.
Save harrisony/5280018 to your computer and use it in GitHub Desktop.
A quickly hacked up script to update folders from VCS
#!/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