X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=cluster_tools%2Fgate_power_merge.sh;h=cc4203a6e000e5871d929cbd730196e577774760;hb=f3457815210ffe8646f3288be3362d34fcc7c3af;hp=c35d67d6b4238389d1e2ff7af17c483f6077730b;hpb=22e282cf465b7f07cd17c4d615d726b079b84058;p=clitk.git diff --git a/cluster_tools/gate_power_merge.sh b/cluster_tools/gate_power_merge.sh index c35d67d..cc4203a 100755 --- a/cluster_tools/gate_power_merge.sh +++ b/cluster_tools/gate_power_merge.sh @@ -290,7 +290,7 @@ function merge_mhd_image { then update_bar ${count} "copying first partial result ${partial}" cp "${partial}" "${merged}" - if test "$last_character" = "d" + if test "$last_character" = "d" then cp "${partial_bin}" "${merged_bin%.*}.${partial_bin##*.}" fi @@ -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 -type d -o -type l -name 'output*' | 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)"