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