]> git.ipfire.org Git - thirdparty/git.git/blame - git-cvsimport-script
[PATCH] cvs-migration.txt
[thirdparty/git.git] / git-cvsimport-script
CommitLineData
d4f8b390
LT
1#!/bin/sh
2ARGS=""
3if [ "$1" == "-v" ]; then
4 ARGS=$1
5 shift
6fi
7
8export CVSROOT="$1"
9export MODULE="$2"
667628d9 10if [ ! "$CVSROOT" ] || [ ! "$MODULE" ] ; then
d4f8b390
LT
11 echo "Usage: git cvsimport <cvsroot> <module>"
12 exit 1
13fi
14
15cvsps -h 2>&1 | grep -q "cvsps version 2.1" >& /dev/null || {
16 echo "I need cvsps version 2.1"
17 exit 1
18}
19
20mkdir "$MODULE" || exit 1
21cd "$MODULE"
22
861cb6f0
TM
23TZ=UTC cvsps -x -A $MODULE > .git-cvsps-result
24[ -s .git-cvsps-result ] || exit 1
25git-cvs2git $ARGS --cvsroot="$CVSROOT" --module="$MODULE" < .git-cvsps-result > .git-create-script || exit 1
d4f8b390
LT
26sh .git-create-script
27