]> git.ipfire.org Git - thirdparty/git.git/blame - git-cvsimport-script
Teach git-pull-script about pulling tags
[thirdparty/git.git] / git-cvsimport-script
CommitLineData
d4f8b390 1#!/bin/sh
9718a00b
TM
2
3usage () {
4 echo "Usage: git cvsimport [-v] [-z fuzz] <cvsroot> <module>"
5 exit 1
6}
7
8CVS2GIT=""
9CVSPS="--cvs-direct -x -A"
10while true; do
11 case "$1" in
12 -v) CVS2GIT="$1" ;;
13 -z) shift; CVSPS="$CVSPS -z $1" ;;
14 -*) usage ;;
15 *) break ;;
16 esac
d4f8b390 17 shift
9718a00b 18done
d4f8b390
LT
19
20export CVSROOT="$1"
21export MODULE="$2"
667628d9 22if [ ! "$CVSROOT" ] || [ ! "$MODULE" ] ; then
9718a00b 23 usage
d4f8b390
LT
24fi
25
26cvsps -h 2>&1 | grep -q "cvsps version 2.1" >& /dev/null || {
27 echo "I need cvsps version 2.1"
28 exit 1
29}
30
31mkdir "$MODULE" || exit 1
32cd "$MODULE"
33
9718a00b 34TZ=UTC cvsps $CVSPS $MODULE > .git-cvsps-result
861cb6f0 35[ -s .git-cvsps-result ] || exit 1
9718a00b 36git-cvs2git $CVS2GIT --cvsroot="$CVSROOT" --module="$MODULE" < .git-cvsps-result > .git-create-script || exit 1
d4f8b390
LT
37sh .git-create-script
38