public
Last active

Script to mirror the SF git repo to github, gitorious, bitbucket, assembla and google code

  • Download Gist
mirrorOpenEMR_sf_git
Shell
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
#!/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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.