From 0042ee0f7f891578a529ad1b9017758292fcb323 Mon Sep 17 00:00:00 2001 From: Chris Greenshields Date: Fri, 22 Dec 2017 14:07:01 +0000 Subject: [PATCH] foamCloneCase: corrected operation with no time dirs --- bin/foamCloneCase | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/foamCloneCase b/bin/foamCloneCase index d3763421c..0a63b8712 100755 --- a/bin/foamCloneCase +++ b/bin/foamCloneCase @@ -62,6 +62,7 @@ error() { } cpIfPresent() { + echo $1 [ -e "$1" ] && echo "... ${1##*/}" && cp -r "$1" "$2" } @@ -143,6 +144,7 @@ cpIfPresent "$srcDir/system" "$tgtDir" cpIfPresent "$srcDir/constant" "$tgtDir" time_dir="$(foamListTimes -withZero -case "$srcDir" | $time_option)" +[ -n "${time_dir}" ] && \ cpIfPresent "$srcDir/${time_dir}" "$tgtDir" [ "${time_dir}" = "0" -o -z "${time_dir}" ] && [ -z "$no_orig" ] && \