Skip to content

Instantly share code, notes, and snippets.

@bradymiller
Created May 22, 2010 17:52
Show Gist options
  • Save bradymiller/410245 to your computer and use it in GitHub Desktop.
Save bradymiller/410245 to your computer and use it in GitHub Desktop.
Script to build and update the OpenEMR github mirror
#!/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) Set up accounts/keys on github and gitorious
# 2) Create directory /git/openemr
# 3) Move to /git directory
# 4) Run the below git cvsimport commmand
# 5) run "git remote add origin [email protected]:openemr/openemr.git"
# 6) run "git remote add originother [email protected]:openemr/openemr.git"
# 7) Place this script in /git and set up cron for every 30 minutes
# 8) On 10/29/20, cherry-pick of last commit in 'PHPMYADMIN_2_11_10' to 'master'
#
# Custom stuff:
# 1) A bug in command was found on 10/1/2010 in git-cvsimport command secondary to not
# having a dash in front of the x parameter, which caused a commit to be missed.
# Luckily no commit was processed after this, so was an easy fix. Likely a bug related
# to a commit happening exactly ten mintutes before the update. There is potential that doing a
# new git-cvsimport command with the correct -x parameters may not reproduce the same
# git repository (so will back current one up frequently :) )
#
# DEPRECATED!!
# On 10/30/2010, the OpenEMR sourceforge repository was converted to git (used the git repository
# that was created and being maintained by this script). So, as of then, this script is no longer
# being used.
#
# go to the local git directory
cd /git/openemr/
# download most recent changes from cvs repository
git cvsimport -k -p -x -v -d :pserver:[email protected]:/cvsroot/openemr openemr
# push new changes to github
git push --tags origin master rel-320
# push new changes to gitorious
git push --tags originother master rel-320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment