[PATCH] cvsimport: allow remote CVS repos
[alt-git.git] / git-cvsimport-script
blob936ed8837eb5f645d1c35b23bb1550a09ed2c293
1 #!/bin/sh
2 ARGS=""
3 if [ "$1" == "-v" ]; then
4 ARGS=$1
5 shift
6 fi
8 export CVSROOT="$1"
9 export MODULE="$2"
10 if [ ! "$CVSROOT" ] || [ ! "$MODULE" ] ; then
11 echo "Usage: git cvsimport <cvsroot> <module>"
12 exit 1
15 cvsps -h 2>&1 | grep -q "cvsps version 2.1" >& /dev/null || {
16 echo "I need cvsps version 2.1"
17 exit 1
20 mkdir "$MODULE" || exit 1
21 cd "$MODULE"
23 TZ=UTC cvsps -A $MODULE | git-cvs2git $ARGS --cvsroot="$CVSROOT" --module="$MODULE" > .git-create-script || exit 1
24 sh .git-create-script