Created
January 8, 2014 11:59
-
-
Save oplatek/8315833 to your computer and use it in GitHub Desktop.
Simple script for mirroring the changes from git repository to svn repository.
Note: Consider using git svn instead.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
gitdir=$1 | |
svndir=$2 | |
pushd $gitdir | |
git ls-files | | |
while read f ; do | |
dir_name="$svndir/`dirname $f`" | |
# echo $dir_name | |
mkdir -p "$svndir/$dir_name" | |
cp -f "$f" "$svndir/$f" | |
pushd "$svndir" >/dev/null | |
svn add "$f" | |
popd >/dev/null | |
done | |
popd > /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment