source: trunk/scripts/git-migration/git-migrate-fast.sh @ 1902

Last change on this file since 1902 was 1902, checked in by andersk, 16 years ago

Accept the path to the svn repository as an argument.

  • Property svn:executable set to *
File size: 525 bytes
Line 
1#!/bin/bash
2set -e
3
4SVN=${1:-/mit/xvm/svn}
5
6mako-render rules.mako > rules
7
8rm git -rf
9mkdir git
10cd git
11
12sed -n 's/^create repository // p' ../rules | while read repo; do
13    mkdir -p "$repo" && GIT_DIR="$repo" git init --bare
14done
15
16echo run > ../run.gdb
17gdb -batch -x ../run.gdb --args svn-all-fast-export ../rules "$SVN"
18
19sed -n 's/^create repository // p' ../rules | while read repo; do
20    ! [ -e "$repo/refs/heads/tags" ] || \
21        cp -a "$repo/refs/heads/tags/." "$repo/refs/tags" && \
22        rm -rf "$repo/refs/heads/tags"
23done
Note: See TracBrowser for help on using the repository browser.