--- /dev/null
+#!/bin/sh
+
+# Script to track FRESCOR SVN repositories. We do this in order not to
+# diverge to much from the original code so that it can be easily
+# joined in future if it will be necessary.
+
+set -e
+
+update() {
+ local dir=$1
+ local svnrepo=$2
+ cd $dir
+ echo "Updating $dir"
+ if ! git config --get svn-remote.svn.url > /dev/null; then
+ git svn init $svnrepo
+ fi
+
+ git svn fetch
+ local gitbranch=`git show-ref --verify --hash refs/heads/frescor-svn`
+ local svnbranch=`git show-ref --verify --hash refs/remotes/git-svn`
+
+ if [ -z "$gitbranch" ]; then
+ echo " Creating frescor-svn branch"
+ git branch frescor-svn git-svn
+ else
+ if [ "$gitbranch" != "$svnbranch" ]; then
+ echo " Merging SVN to branch frescor-svn"
+ git merge git-svn
+ git checkout master
+ else
+ echo " Already up-to-date"
+ fi
+ fi
+ cd ..
+}
+
+update frsh-include http://www.frescor.org/private/svn/frescor/frsh/trunk/include
+update fosa http://www.frescor.org/private/svn/frescor/fosa/trunk
+update fna http://www.frescor.org/private/svn/frescor/fna/trunk