From 60d0913f487ddbbbff8ef83084a4267e8d2f310e Mon Sep 17 00:00:00 2001 From: Trevor Batley Date: Tue, 9 May 2023 18:33:32 +1000 Subject: [PATCH] use rm -Rf rther than complicated find -delete --- git-cvs2git.sh | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/git-cvs2git.sh b/git-cvs2git.sh index 6217ad1..69f804d 100755 --- a/git-cvs2git.sh +++ b/git-cvs2git.sh @@ -131,15 +131,15 @@ cd $CVSFiles # if there at all if [ -d "$1" ] ; then if [ $DEBUG ] ; then echo "************Deleting local CVS files" ; fi - cd $CVSFiles/$1 +# cd $CVSFiles/$1 # Delete all files, links and directories - find . -maxdepth 999 -xtype l -delete - find . -maxdepth 999 -type f -delete +# find . -maxdepth 999 -xtype l -delete +# find . -maxdepth 999 -type f -delete # we seem to need this as well - find . -xtype l -exec rm -f {} + - find . -maxdepth 999 -type d -delete - cd $CVSFiles -# rm -Rf $1 +# find . -xtype l -exec rm -f {} + +# find . -maxdepth 999 -type d -delete +# cd $CVSFiles + rm -Rf $CVSFiles/$1 fi @@ -208,15 +208,15 @@ cd $GITFiles # Delete the local first if [ -d "$1" ] ; then if [ $DEBUG ] ; then echo "************Deleting local GIT files" ; fi - cd $GITFiles/$1 - find . -maxdepth 999 -xtype l -delete - find . -maxdepth 999 -type f -delete +# cd $GITFiles/$1 +# find . -maxdepth 999 -xtype l -delete +# find . -maxdepth 999 -type f -delete # we seem to need this as well - find . -xtype l -exec rm -f {} + - find . -maxdepth 999 -type d -delete - cd $GITFiles - rmdir $1 -# rm -Rf $1 +# find . -xtype l -exec rm -f {} + +# find . -maxdepth 999 -type d -delete +# cd $GITFiles +# rmdir $1 + rm -Rf $GITFiles/$1 fi @@ -248,17 +248,16 @@ if [ -d "$1" ] ; then mv -f README.md "$READMECONTENTS" fi if [ $DEBUG ] ; then echo "************Saved README: $READMECONTENTS" ; fi - cd $GITFiles # Delete all files, links and directories if [ $DEBUG ] ; then echo "************Deleting local GIT files" ; fi - find . -maxdepth 999 -xtype l -delete - find . -maxdepth 999 -type f -delete +# find . -maxdepth 999 -xtype l -delete +# find . -maxdepth 999 -type f -delete # we seem to need this as well - find . -xtype l -exec rm -f {} + - find . -maxdepth 999 -type d -delete +# find . -xtype l -exec rm -f {} + +# find . -maxdepth 999 -type d -delete cd $GITFiles - rmdir $1 -# rm -Rf $1 +# rmdir $1 + rm -Rf $GITFiles/$1 fi