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
36 echo "Usage:" `basename $0`" [OPTIONS] <sha1>"
39 echo " -C run a cvsclean. "
40 echo " WARNING: this will run cvs up -C"
41 echo " and then remove all found .#* files"
42 echo " -c commit to cvs if no errors occured"
43 echo " -f force patching in case of an unclean"
44 echo " cvs repository"
45 echo " -V show version information"
75 echo >&2 "Parameter $1 is not known."
90 if test "$cvsclean" = "t"
92 cd ".cvs" && cvs up
-C && find .
-iname ".#*" -exec rm '{}' \
;
96 if test -d ".git" -a -d ".cvs"
99 GIT_DIR
="../.git" git-cvsexportcommit
-v $force $commit -u $1
104 echo >&2 "Not a git repository"
109 echo >&2 "No cvs repository found in .cvs. "
110 echo >&2 "Make sure you follow the standards"