From 59b4a77d232e510d2ac15019631362129508d875 Mon Sep 17 00:00:00 2001
From: Andrew Heather <a.heather@opencfd.co.uk>
Date: Tue, 26 Jun 2018 11:51:02 +0100
Subject: [PATCH] TUT: RunFunctions - added protection for user shell
 customisations

---
 bin/tools/RunFunctions | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/bin/tools/RunFunctions b/bin/tools/RunFunctions
index acc3a987a3b..ed1e5357039 100644
--- a/bin/tools/RunFunctions
+++ b/bin/tools/RunFunctions
@@ -313,17 +313,17 @@ cloneParallelCase()
         # Only copy some time directories
         echo "    clone processor directories with $# times: $@"
 
-        for proc in $(cd $src && \ls -d processor*)
+        for proc in $(\cd $src && \ls -d processor*)
         do
             srcProc=$src/$proc
             dstProc=$dst/$proc
 
             mkdir $dstProc
-            cp -r $srcProc/constant $dstProc/
+            \cp -r $srcProc/constant $dstProc/
 
             for time
             do
-                [ -d $srcProc/$time ] && cp -r $srcProc/$time $dstProc/
+                [ -d $srcProc/$time ] && \cp -r $srcProc/$time $dstProc/
             done
 
         done
@@ -353,7 +353,7 @@ restore0Dir()
         then
         (
             echo "Filter #include directives in processors/0:"
-            cd processors/0 2>/dev/null || exit 0
+            \cd processors/0 2>/dev/null || exit 0
             for file in $(grep -l "#include" * 2> /dev/null)
             do
                 foamDictionary "$file" > "$file.$$." && mv "$file.$$." "$file"
-- 
GitLab