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
12 echo "Usage:" `basename $0` "[OPTIONS] <cvsroot> <module>"
16 echo " -d <dir> directory for checkout"
17 echo " -gu convert underscores during gitimport"
18 echo " -u do not write an ignore file"
19 echo " -V show version information"
20 echo " -r <remote> used refs/remotes/<remote>/ to import CVS branches into"
21 echo " default is 'cvs'"
63 echo >&2 "Parameter $1 is not known."
81 echo "Repository: $CVSROOT"
82 echo "Module: $MODULE"
90 if test -d "$dir/.cvs"
92 echo >&2 "It seems that you are trying to use gc-import on an allready tracked repository."
93 die
"Please use gc-update instead"
96 test -d "$dir" && die
"directory $dir exists"
100 git-cvsimport
-r "$remote" -a -k $verbose $cvrtudsr -m -d$CVSROOT -C "$dir" $MODULE && cd "$dir" && git-config gc-utils.remote
"$remote" && echo "Initialize CVS repository in $PWD/.cvs" && cvs
-d$CVSROOT $quiet -z 9 co
-d ".cvs" $MODULE
107 if test -n "$ignorefile"
109 if test ! -f ".gitignore"
111 echo ".cvs" > ".gitignore" && echo "Create ignore file in $PWD/.gitignore"
113 echo ".cvs" >> ".gitignore" && echo "Add ignore entry to $PWD/.gitignore"