Skip to content

Instantly share code, notes, and snippets.

@sergeyt
Created April 7, 2016 05:28
Show Gist options
  • Save sergeyt/0d603bc7f64b2bf8d2aef795f93fda91 to your computer and use it in GitHub Desktop.
Save sergeyt/0d603bc7f64b2bf8d2aef795f93fda91 to your computer and use it in GitHub Desktop.
cwd=$PWD
for d in */ ; do
dirname="$cwd/$(basename "${d}")"
cd $dirname
if [ -d ".git" ]; then
git pull
fi
if [ -d ".hg" ]; then
hg pull -u
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment