2 # Copyright (c) 2007 David Soria Parra <dsp at php dot net>
4 # Licensed under the terms of the MIT License
5 # See /usr/share/doc/gcutils/copyright
6 # or http://www.opensource.org/licenses/mit-license.php
14 git
--version > /dev
/null
18 echo >&2 "Git not found. It's either not installed or not in \$PATH"
22 version
=`git --version | grep -o "[12]\.[5-9]\.[0-9]"`
25 echo "Wrong git version. $prog needs git 1.5.0 or higher, but "`git --version`" found."
32 echo "$PROGNAME: "`basename $0`-$VERSION
37 echo "Usage:" `basename $0` "[OPTIONS] <cvsroot> <module>"
41 echo " -d <dir> directory for checkout"
42 echo " -gu convert underscores during gitimport"
43 echo " -u Do not write an ignore file"
44 echo " -V show version information"
81 echo >&2 "Parameter $1 is not known."
99 echo "Repository: $CVSROOT"
100 echo "Module: $MODULE"
103 if test ${#dir} -eq 0
108 if test -d "$dir/.cvs"
110 echo "It seems that you are trying to use gc-import on an allready tracked repository."
111 echo "Please use gc-update instead"
117 git-cvsimport
-a -k $verbose $cvrtudsr -m -d$CVSROOT -C "$dir" $MODULE && cd "$dir" && echo "Initialize CVS repository in $PWD/.cvs" && cvs
-d$CVSROOT $quiet -z 9 co
-d ".cvs" $MODULE
125 if test -n "$ignorefile"
127 if test ! -f ".gitignore"
129 echo ".cvs" > ".gitignore" && echo "Create ignore file in $PWD/.gitignore"
131 echo ".cvs" >> ".gitignore" && echo "Add ignore entry to $PWD/.gitignore"