From: Simon Rit Date: Fri, 7 Mar 2014 10:25:07 +0000 (+0100) Subject: Fix merge with the copy of mac folder and copy the mac folder in the X-Git-Tag: v1.4.0~125 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=bf524e64011b3d10ce2ee7b86236e4c53efb8e5f;hp=24741436ad1313451efbc41f181a61d004122424;p=clitk.git Fix merge with the copy of mac folder and copy the mac folder in the results directory --- diff --git a/cluster_tools/gate_power_merge.sh b/cluster_tools/gate_power_merge.sh index df46813..cc4203a 100755 --- a/cluster_tools/gate_power_merge.sh +++ b/cluster_tools/gate_power_merge.sh @@ -496,7 +496,7 @@ echo "!!!! this is $0 v0.3k !!!!" rundir="${1?"provide run dir"}" rundir="$(echo "${rundir}" | sed 's|/*$||')" -nboutputdirs="$(find "${rundir}" -mindepth 1 -name 'output*' -type d -o -type l | wc -l)" +nboutputdirs="$(find "${rundir}" -mindepth 1 -type d -name 'output*' -o -type l -name 'output*' | wc -l)" test ${nboutputdirs} -gt 0 || error "no output dir found" echo "found ${nboutputdirs} partial output dirs" @@ -511,7 +511,6 @@ echo "output dir is ${outputdir}" test -d "${outputdir}" && rm -r "${outputdir}" mkdir "${outputdir}" -ls ${rundir}/ for outputfile in $(find -L "${rundir}" -regextype 'posix-extended' -type f -regex "${rundir}/output.*\.(hdr|mhd|mha|root|txt)" | awk -F '/' '{ print $NF; }' | sort | uniq) do merge_dispatcher "${outputfile}" @@ -530,4 +529,10 @@ then cp "${rundir}/params.txt" "${outputdir}/params.txt" fi +if [ -d "${rundir}/mac" ] +then + echo "copying mac folder" + cp -r "${rundir}/mac" "${outputdir}/mac" +fi + echo "these was ${warning_count} warning(s)"