scripts: Replaced 'cp -r' with the POSIX compliant 'cp -R'

This commit is contained in:
Henry Weller
2021-07-06 17:41:08 +01:00
parent 013bc08399
commit 6b2dfd218a
13 changed files with 21 additions and 21 deletions

View File

@ -39,7 +39,7 @@ Description
mkdir processorN
# Copy undecomposed polyMesh
cp -r constant processor0
cp -R constant processor0
# Distribute
mpirun -np ddd redistributePar -parallel

View File

@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@ -63,7 +63,7 @@ error() {
}
cpIfPresent() {
[ -e "$1" ] && echo "$1 to ... ${1##*/}" && cp -r "$1" "$2"
[ -e "$1" ] && echo "$1 to ... ${1##*/}" && cp -R "$1" "$2"
}
isCaseValid() {

View File

@ -3,7 +3,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 2015-2018 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@ -220,7 +220,7 @@ do
esac
done
echo "Creating Make subdirectory" && cp -r "${dir}/Make" "${name}"
echo "Creating Make subdirectory" && cp -R "${dir}/Make" "${name}"
# Get ...Fields.C for template class, otherwise ...Field.C
compiled=$(find "${name}" -name "*.C" -exec basename {} \; | sort | tail -1)

View File

@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@ -170,7 +170,7 @@ cloneCase()
mkdir -p $to
for f in 0 system constant
do
cp -r $from/$f $to
cp -R $from/$f $to
done
return 0
fi

View File

@ -22,15 +22,15 @@ runParallel -s uncollated $application -fileHandler uncollated
rm -rf machineA/fileHandler
mkdir -p machineA/fileHandler
( cd machineA/fileHandler && \
cp -r ../../processor[0-1] . && \
cp -r ../../system . && \
cp -R ../../processor[0-1] . && \
cp -R ../../system . && \
mkdir -p constant && find ../../constant -type f -exec cp {} constant/ \;
)
#- Note: slave node does not need constant&system since these are global
rm -rf machineB/fileHandler
mkdir -p machineB/fileHandler
( cd machineB/fileHandler && \
cp -r ../../processor[2-3] .
cp -R ../../processor[2-3] .
)
#- Run with different roots
( d=$PWD && \
@ -77,8 +77,8 @@ runApplication -s collated decomposePar \
rm -rf machineA/fileHandler
mkdir -p machineA/fileHandler
( cd machineA/fileHandler && \
cp -r ../../processor* . && \
cp -r ../../system . && \
cp -R ../../processor* . && \
cp -R ../../system . && \
mkdir -p constant && find ../../constant -type f -exec cp {} constant/ \;
)
#- Note: slave node does not need constant&system since these are global

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
./Allmesh
cp -rf 0.orig 0
cp -Rf 0.orig 0
application=$(getApplication)

View File

@ -6,7 +6,7 @@ application=$(getApplication)
runApplication blockMesh
cp -r 0.orig 0
cp -R 0.orig 0
# Create 1D and 3D baffles
runApplication createBaffles -overwrite

View File

@ -21,7 +21,7 @@ runMapFieldsConsistent()
copySolutionDirs()
{
echo "Copying $2/0* directory to $1"
cp -r $2/0* $1
cp -R $2/0* $1
}
setCavityFine()
@ -77,7 +77,7 @@ do
runMapFieldsConsistent $previousCase $caseName
;;
cavityClipped)
cp -r $caseName/0 $caseName/0.5
cp -R $caseName/0 $caseName/0.5
runMapFields cavity $caseName
;;
esac

View File

@ -11,7 +11,7 @@ runApplication blockMesh
# Create faceZones for baffles and fan
runApplication topoSet
cp -r 0.orig 0
cp -R 0.orig 0
# Create wall and cyclic baffles and the fields on them
runApplication createBaffles -overwrite

View File

@ -18,7 +18,7 @@ runApplication simpleFoam
# Copy the mesh from the steady state case and map the results to a
# mesh motion case, then solve transient.
cd ../wingMotion2D_pimpleFoam
cp -r ../wingMotion2D_simpleFoam/constant/polyMesh constant
cp -R ../wingMotion2D_simpleFoam/constant/polyMesh constant
runApplication mapFields ../wingMotion2D_simpleFoam -sourceTime latestTime -consistent
cp pointDisplacement 0/pointDisplacement
runApplication decomposePar

View File

@ -16,7 +16,7 @@ cloneParallelCase()
cpfiles="processor* system constant"
for f in $cpfiles
do
cp -r $1/$f $2
cp -R $1/$f $2
done
fi
}

View File

@ -13,7 +13,7 @@ cd ..
cd hopperEmptying
rm -rf 0
cp -r 0.orig 0
cp -R 0.orig 0
runApplication blockMesh
runApplication mapFields ../hopperInitialState -sourceTime latestTime
runApplication decomposePar

View File

@ -18,7 +18,7 @@ runApplication -s selectBottom \
runApplication createPatch -overwrite
cp -r 0.orig 0 > /dev/null 2>&1
cp -R 0.orig 0 > /dev/null 2>&1
runApplication $application