Created
December 6, 2011 14:57
-
-
Save toke/1438463 to your computer and use it in GitHub Desktop.
git cvs update helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GIT="/usr/bin/git" | |
CVS_MODULE_BASE="BASEPATH/" | |
if [ -d .git ] ; then | |
if [ `git config --get cvsimport.module` ] ; then | |
echo "Good! Using the short cvsimport method" | |
${GIT} cvsimport | |
else | |
MODULE=`/usr/bin/basename \`/bin/pwd\`` | |
CVS_MODULE="${CVS_MODULE_BASE}${MODULE}" | |
echo -e "IF YOU HAVE SET config cvsimport.module \$MODULNAME, and cvsimport.r cvs, cvsimport.d \$CVSROOT you may (and should) run git cvsimport!\n" | |
echo -e "You can do this by typing:\n" | |
echo "git config cvsimport.module ${CVS_MODULE}" | |
echo "git config cvsimport.r cvs" | |
echo -e "git config cvsimport.d \$CVSROOT\n\n" | |
echo "Trying to update ${MODULE} from CVS via ${CVSROOT}" | |
${GIT} cvsimport -d $CVSROOT -r cvs -k ${CVS_MODULE} -o master | |
fi | |
else | |
echo "Not an git repository or not on repository root" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment