blob: ad0adf14376c426cce550c3542e0aea527802517 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/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
|