You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
569 B

#!/bin/sh
ARGS=""
if [ "$1" == "-v" ]; then
ARGS=$1
shift
fi
export CVSROOT="$1"
export MODULE="$2"
if [ ! "$CVSROOT" ] || [ ! "$MODULE" ] ; then
echo "Usage: git cvsimport <cvsroot> <module>"
exit 1
fi
cvsps -h 2>&1 | grep -q "cvsps version 2.1" >& /dev/null || {
echo "I need cvsps version 2.1"
exit 1
}
mkdir "$MODULE" || exit 1
cd "$MODULE"
TZ=UTC cvsps -x -A $MODULE > .git-cvsps-result
[ -s .git-cvsps-result ] || exit 1
git-cvs2git $ARGS --cvsroot="$CVSROOT" --module="$MODULE" < .git-cvsps-result > .git-create-script || exit 1
sh .git-create-script