use rm -Rf rther than complicated find -delete

This commit is contained in:
Trevor Batley 2023-05-09 18:33:32 +10:00
parent 1e64eed0c1
commit 60d0913f48

View File

@ -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