Created
October 31, 2010 09:18
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Copyright (C) 2010 Brady Miller <[email protected]> | |
# | |
# 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 [email protected]:openemr/openemr.git" | |
# 5) run "git remote add gitorious [email protected]:openemr/openemr.git" | |
# 6) run "git remote add googlecode https://code.google.com/p/openemr" | |
# 7) run "git remote add bitbucket [email protected]:openemr/openemr.git" | |
# 8) run "git remote add assembla [email protected]: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