mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: adjust ordering of 'find' command arguments
- use -name test before -type test to avoid calling stat(2) on every file. - use -delete instead of -exec rm to avoid forking
This commit is contained in:
@ -4,10 +4,14 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
echo "--------"
|
||||
echo "Cleaning tutorials ..."
|
||||
echo "Removing backup files"
|
||||
find . -type f \( -name "*~" -o -name "*.bak" \) -exec rm {} \;
|
||||
find . \( -name core -o -name 'core.[1-9]*' \) -exec rm {} \;
|
||||
find . \( -name '*.pvs' -o -name '*.OpenFOAM' \) -exec rm {} \;
|
||||
rm logs testLoopReport > /dev/null 2>&1
|
||||
|
||||
find . \( \
|
||||
-name '*~' -o -name '*.bak' \
|
||||
-name core -o -name 'core.[1-9]*' \
|
||||
-name '*.pvs' -o -name '*.OpenFOAM' \
|
||||
\) -type f -delete
|
||||
|
||||
rm -f logs testLoopReport > /dev/null 2>&1
|
||||
|
||||
foamCleanTutorials cases
|
||||
|
||||
|
||||
Reference in New Issue
Block a user