git-svn-sync/server-hooks/post-receive
Mario Fernandez 4c12f4021f Initial commit with the scripts to synchronize git with svn
This contains multiple scripts:
 - A script to synchronize an existing git repository with subversion
   via a git synch client
 - hooks for the git server to trigger the sync after a push
 - a hook for the client to reject every manual change
 - A script to create a new git server repository, along with the git
   synch client, starting from an existing subversion repository.
2012-05-30 11:58:42 +02:00

19 lines
491 B
Bash
Executable file

# -*- mode: Shell-script-*-
#!/usr/bin/bash
#
# This hook is intended to be installed for a git server. It calls a
# script that synchronizes every change with subversion.
#
# Required environment variables:
# - GIT_SCRIPTS: directory where the git sync scripts are located
#
# Author: Mario Fernandez
master="refs/heads/master"
while read oldrev newrev refname
do
if [ "$master" == "$refname" ] ; then
sh ${GIT_SCRIPTS}/git-sync-with-svn.sh $(basename $PWD .git)
fi
done