From 6b2dfd218af18ecb7936190de122d7c85ec83b85 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 6 Jul 2021 17:41:08 +0100 Subject: [PATCH] scripts: Replaced 'cp -r' with the POSIX compliant 'cp -R' --- .../redistributePar/redistributePar.C | 2 +- bin/foamCloneCase | 4 ++-- bin/foamNewBC | 4 ++-- bin/tools/RunFunctions | 4 ++-- test/IO/fileHandler/Allrun | 10 +++++----- .../Lagrangian/hotBoxes/Allrun-parallel | 2 +- .../buoyantSimpleFoam/circuitBoardCooling/Allrun | 2 +- tutorials/incompressible/icoFoam/cavity/Allrun | 4 ++-- .../incompressible/pimpleFoam/RAS/TJunctionFan/Allrun | 2 +- .../incompressible/pimpleFoam/RAS/wingMotion/Allrun | 2 +- tutorials/incompressible/pisoFoam/LES/motorBike/Allrun | 2 +- tutorials/lagrangian/particleFoam/hopper/Allrun | 2 +- .../movingOscillatingBox/Allrun | 2 +- 13 files changed, 21 insertions(+), 21 deletions(-) diff --git a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C index 562da7029a..00286f6802 100644 --- a/applications/utilities/parallelProcessing/redistributePar/redistributePar.C +++ b/applications/utilities/parallelProcessing/redistributePar/redistributePar.C @@ -39,7 +39,7 @@ Description mkdir processorN # Copy undecomposed polyMesh - cp -r constant processor0 + cp -R constant processor0 # Distribute mpirun -np ddd redistributePar -parallel diff --git a/bin/foamCloneCase b/bin/foamCloneCase index eb63bb674f..d39f30451e 100755 --- a/bin/foamCloneCase +++ b/bin/foamCloneCase @@ -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() { diff --git a/bin/foamNewBC b/bin/foamNewBC index a2d492dab6..1ebd403c71 100755 --- a/bin/foamNewBC +++ b/bin/foamNewBC @@ -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) diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions index 842ee9e177..1a040df6aa 100644 --- a/bin/tools/RunFunctions +++ b/bin/tools/RunFunctions @@ -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 diff --git a/test/IO/fileHandler/Allrun b/test/IO/fileHandler/Allrun index 58fa2ece4e..bab6a20cff 100755 --- a/test/IO/fileHandler/Allrun +++ b/test/IO/fileHandler/Allrun @@ -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 diff --git a/tutorials/combustion/buoyantReactingFoam/Lagrangian/hotBoxes/Allrun-parallel b/tutorials/combustion/buoyantReactingFoam/Lagrangian/hotBoxes/Allrun-parallel index 1c0d398357..0a78d8e6cd 100755 --- a/tutorials/combustion/buoyantReactingFoam/Lagrangian/hotBoxes/Allrun-parallel +++ b/tutorials/combustion/buoyantReactingFoam/Lagrangian/hotBoxes/Allrun-parallel @@ -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) diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun index 606b122998..c5c04882e2 100755 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/Allrun @@ -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 diff --git a/tutorials/incompressible/icoFoam/cavity/Allrun b/tutorials/incompressible/icoFoam/cavity/Allrun index fdeea0d08d..fbdb2b354e 100755 --- a/tutorials/incompressible/icoFoam/cavity/Allrun +++ b/tutorials/incompressible/icoFoam/cavity/Allrun @@ -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 diff --git a/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allrun b/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allrun index 0b456be26d..7cf8c88552 100755 --- a/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allrun +++ b/tutorials/incompressible/pimpleFoam/RAS/TJunctionFan/Allrun @@ -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 diff --git a/tutorials/incompressible/pimpleFoam/RAS/wingMotion/Allrun b/tutorials/incompressible/pimpleFoam/RAS/wingMotion/Allrun index 2156fdd37a..ef2fb87151 100755 --- a/tutorials/incompressible/pimpleFoam/RAS/wingMotion/Allrun +++ b/tutorials/incompressible/pimpleFoam/RAS/wingMotion/Allrun @@ -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 diff --git a/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun b/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun index 15e3932e9e..ae2f71d705 100755 --- a/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun +++ b/tutorials/incompressible/pisoFoam/LES/motorBike/Allrun @@ -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 } diff --git a/tutorials/lagrangian/particleFoam/hopper/Allrun b/tutorials/lagrangian/particleFoam/hopper/Allrun index 9a719a536d..393104661b 100755 --- a/tutorials/lagrangian/particleFoam/hopper/Allrun +++ b/tutorials/lagrangian/particleFoam/hopper/Allrun @@ -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 diff --git a/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/Allrun b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/Allrun index 9d806d2871..8ff1caf430 100755 --- a/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/Allrun +++ b/tutorials/multiphase/potentialFreeSurfaceFoam/movingOscillatingBox/Allrun @@ -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