From ce567e4b766fdf5d0a3e45d16c6bd1b50db60efc Mon Sep 17 00:00:00 2001
From: Mark Olesen <Mark.Olesen@Germany>
Date: Mon, 10 Aug 2009 09:04:26 +0200
Subject: [PATCH] foamCopySettings: more readable with sed/tr

---
 bin/foamCopySettings | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/bin/foamCopySettings b/bin/foamCopySettings
index d066b275dfc..eaa6a0cc8c3 100755
--- a/bin/foamCopySettings
+++ b/bin/foamCopySettings
@@ -82,20 +82,13 @@ fileList=$(find -H $srcDir -mindepth 1 -maxdepth 1 -not -name "processor*")
 # avoid polyMesh and processor* directories
 rsync="rsync --exclude polyMesh --exclude processor*"
 
-
 #
-# get any extra options
-# only extract lines starting with --option xxx
+# get any extra user options
+# extract lines starting with '--longOption'
 #
 if rcFile=$(foamEtcFile $Script.rc)
 then
-    userOpts=$(
-        cat $rcFile | while read userOpts
-        do
-            [ "${userOpts##--}" != "${userOpts}" ] && echo $userOpts
-        done
-    )
-    rsync="$rsync $userOpts"
+    rsync="$rsync "$(sed -ne '/^ *--/p' $rcFile | tr '\n' ' ')
 fi
 
 
-- 
GitLab