From debaf10c78ce1191f08caf286b4b2a2f7ce5cf45 Mon Sep 17 00:00:00 2001 From: Douglas Greve Date: Fri, 25 Jun 2021 12:25:35 -0400 Subject: [PATCH] talairach_avi. #BF. I think I fixed the mv error. --- talairach_avi/talairach_avi | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/talairach_avi/talairach_avi b/talairach_avi/talairach_avi index f03ae69ff0a..5cb2cc49cfc 100755 --- a/talairach_avi/talairach_avi +++ b/talairach_avi/talairach_avi @@ -102,14 +102,19 @@ echo $cmd >>& $LF $cmd >>& $LF set st = $status -# This used to assume that transforms was the outdir -set cmd = (mv -f talsrcimg_to_${target}_t4_vox2vox.txt $OutDir) -echo $cmd >>& $LF -$cmd >>& $LF -set st = $status -if($st) then - echo "ERROR: avi2talxfm failed, see $LF" - exit 1; + +# This used to assume that "transforms" was the outdir +set fname1 = `getfullpath talsrcimg_to_${target}_t4_vox2vox.txt` +set fname2 = `getfullpath $OutDir/talsrcimg_to_${target}_t4_vox2vox.txt` +if($fname1 != $fname2) then + set cmd = (mv -f $fname1 $fname2) + echo $cmd |& tee -a $LF + $cmd |& tee -a $LF + set st = $status + if($st) then + echo "ERROR: avi2talxfm failed, see $LF" + exit 1; + endif endif # Create an lta version of the xfm for convenience