Skip to content

Instantly share code, notes, and snippets.

@tghw
Created February 24, 2009 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tghw/69839 to your computer and use it in GitHub Desktop.
Save tghw/69839 to your computer and use it in GitHub Desktop.
#!/bin/sh
USER=user
cd ~/src/clones/
for DIR in *; do
if [ -d $DIR ]; then
cd $DIR
cd source
if [ -d .git ]; then
git pull
elif [ -d .bzr ]; then
bzr pull
elif [ -d .svn ]; then
svn up
else
echo "$DIR is not a known repository type."
fi
cd ..
hg convert source hg
cd hg
hg push ssh://hg@bitbucket.org/$USER/$DIR/
cd ..
cd ..
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment