SVN->GIT link broken?

Derek Atkins derek at ihtfp.com
Tue Mar 26 15:18:34 EDT 2013


On Tue, March 26, 2013 2:24 pm, John Ralls wrote:

[snip]
> It's perhaps a bit more involved than what you need because it has to
> decide which repo to update. You also might prefer to get emails than to
> use syslog.

Okay, I've added a lock so it should handle the case of back-to-back
commits.  I still need to handle a github failure.  Here's the current
script:

#!/bin/bash
#

trigger=/home/svn/repo/tmp/trigger
lockfile=/home/svn/repo/tmp/lockfile
HOME=${HOME-/home/git-svn}

# Only run this if we've been tickled
if [ ! -f $trigger ] ; then
  exit 0
fi
rm -f $trigger

# We've been tickled.  Wait until we've acquired the lock.
(
  flock 9

  # Iterate over each repo and sync to gitolite
  #echo "cd $HOME"
  cd $HOME
  for repo in gnucash gnucash-docs gnucash-htdocs ; do
    ./git-svn-mirror update git-svn/$repo
  done

  # Todo -- if the push to github failed we should re-touch the trigger
) 9>$lockfile


>
> Regards,
> John Ralls

-derek

-- 
       Derek Atkins                 617-623-3745
       derek at ihtfp.com             www.ihtfp.com
       Computer and Internet Security Consultant



More information about the gnucash-devel mailing list