Skip to content

Instantly share code, notes, and snippets.

@bradymiller
Created October 31, 2010 09:18
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save bradymiller/656339 to your computer and use it in GitHub Desktop.
Save bradymiller/656339 to your computer and use it in GitHub Desktop.
Script to mirror the SF git repo to github, gitorious, bitbucket, assembla and google code
#!/bin/bash
#
# Copyright (C) 2010 Brady Miller <brady@sparmy.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
#
# Initial set up:
# 1) Create directory /git/sfMirror
# 2) Move to /git/sfMirror directory
# 3) run "git clone --mirror git://openemr.git.sourceforge.net/gitroot/openemr/openemr"
# 4) run "git remote add github git@github.com:openemr/openemr.git"
# 5) run "git remote add gitorious git@gitorious.org:openemr/openemr.git"
# 6) run "git remote add googlecode https://code.google.com/p/openemr"
# 7) run "git remote add bitbucket git@bitbucket.org:openemr/openemr.git"
# 8) run "git remote add assembla git@git.assembla.com:openemr.git"
# 9) run "git remote add codeplex https://git01.codeplex.com/openemr"
# 10) Place this script in /git and set up cron for every 30 minutes
# go to the local git mirror/bare directory
cd /git/sfMirror/openemr.git
# download most recent changes from sourceforge git repository
git fetch
# push new changes to github
git push --all github
git push --tags github
# push new changes to gitorious
git push --all gitorious
git push --tags gitorious
# push new changes to bitbucket
git push --all bitbucket
git push --tags bitbucket
# push new changes to assembla
git push --all assembla
git push --tags assembla
# push new changes to google code
env GIT_SSL_NO_VERIFY=true git push --all googlecode
env GIT_SSL_NO_VERIFY=true git push --tags googlecode
# push new changes to codeplex
env GIT_SSL_NO_VERIFY=true git push --all codeplex
env GIT_SSL_NO_VERIFY=true git push --tags codeplex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment