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
13 git
--version > /dev
/null
17 echo >&2 "Git not found. It's either not installed or not in \$PATH"
21 version
=`git --version | grep -o "[12]\.[5-9]\.[0-9]"`
24 echo "Wrong git version. $prog needs git 1.5.0 or higher, but "`git --version`" found."
31 echo "$PROGNAME: "`basename $0`-$VERSION
35 gitdir
=`git-rev-parse --git-dir 2> /dev/null`
36 if test "$gitdir" = ""
38 echo >&2 "Please use this command from a git working tree."
46 echo "Usage:" `basename $0`" [OPTIONS] <sha1>"
49 echo " -C run a cvsclean. "
50 echo " WARNING: this will run cvs up -C"
51 echo " and then remove all found .#* files"
52 echo " -c commit to cvs if no errors occured"
53 echo " -f force patching in case of an unclean"
54 echo " cvs repository"
55 echo " -V show version information"
85 echo >&2 "Parameter $1 is not known."
101 if test "$cvsclean" = "t"
103 cd ".cvs" && cvs up
-C && find .
-iname ".#*" -exec rm '{}' \
;
106 if test -d ".git" -a -d ".cvs"
109 GIT_DIR
="../.git" git-cvsexportcommit
-v $force $commit -u $1
113 echo >&2 "Not a git repository"
118 echo >&2 "No cvs repository found in .cvs. "
119 echo >&2 "Make sure you follow the standards"