From 5e3faeabb9a088ebca9681743f51d39d2c8d39a1 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Fri, 30 Mar 2007 23:52:29 -0500 Subject: Improved handling of ignore patterns. --- bin/control_rancid.in | 68 ++++++++++++++++++++++++++++++++++----------------- 1 file changed, 46 insertions(+), 22 deletions(-) diff --git a/bin/control_rancid.in b/bin/control_rancid.in index ffef024..d339d66 100644 --- a/bin/control_rancid.in +++ b/bin/control_rancid.in @@ -152,29 +152,53 @@ then fi cd $DIR -# create a .cvsignore -if [ ! -f .cvsignore ] -then - rm -f .cvsignore - cat >.cvsignore < .cvsignore + cvs add .cvsignore + cvs commit -m "Adding .cvsignore" + fi + ;; + svn ) + svn proplist . | grep -q 'svn:ignore' + if [ $? -ne 0 ]; then + create_ignore > .svnignore + svn propset svn:ignore -F .svnignore . + svn commit -m "Adding svn:ignore" + rm -f .svnignore + fi + ;; + git ) + if [ ! -f .gitignore ]; then + rm -f .gitignore + create_ignore > .gitignore + ( + flock -x 200 + git add .gitignore + git commit -m "Adding .gitignore" + ) 200>$BASEDIR/.lockfile + fi + ;; +esac case $RCSSYS in cvs | svn ) -- cgit