#!/bin/sh # # Sync git-svn repo to git repository. # # To be called in crontab. if [ $# -lt 2 ] ; then echo "usage: ${0} GIT_SVN_REPO_CHECKOUT GIT_REPO" exit 2 fi GIT_SVN_REPO_CHECKOUT=$1 GIT_REPO=$2 if [ ! -d $GIT_SVN_REPO_CHECKOUT/.git/svn ] ; then echo "error: no git-svn checkout found in $GIT_SVN_REPO_CHECKOUT" exit 3 fi p=$(pwd) cd $GIT_SVN_REPO_CHECKOUT git svn rebase git push --all $GIT_REPO cd $p # vim:ft=sh