2 # Licensed under the terms of the MIT License
3 # See /usr/share/doc/gcutils/copyright
4 # or http://www.opensource.org/licenses/mit-license.php
11 git
--version > /dev
/null
15 echo >&2 "Git not found. It's either not installed or not in \$PATH"
19 version
=`git --version | grep -o "[12]\.[5-9]\.[0-9]"`
22 echo "Wrong git version. $prog needs git 1.5.0 or higher, but "`git --version`" found."
29 echo "$PROGNAME: "`basename $0`-$VERSION
34 echo "Usage:" `basename $0`" [OPTIONS] <sha1>"
37 echo " -C run a cvsclean. "
38 echo " WARNING: this will run cvs up -C"
39 echo " and then remove all found .#* files"
40 echo " -c commit to cvs if no errors occured"
41 echo " -f force patching in case of an unclean"
42 echo " cvs repository"
43 echo " -V show version information"
73 echo >&2 "Parameter $1 is not known."
88 if test cvsclean
= "t"
90 cd ".cvs" && cvs up
-C && find .
-iname ".#*" -exec rm '{}' \
;
94 if test -d ".git" -a -d ".cvs"
96 git-cvsexportcommit
-v $force $commit -u -w ".cvs/" $1
100 echo >&2 "Not a git repository"
105 echo >&2 "No cvs repository found in .cvs. "
106 echo >&2 "Make sure you follow the standards"