[pubgit-commits-list] Clitk branch master updated. v1.2.0-628-gd959a9a

root root at tux.creatis.insa-lyon.fr
Thu Jan 26 13:46:34 CET 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Clitk".

The branch, master has been updated
       via  d959a9ad92f360947d857261b8ebd758abf4992e (commit)
      from  4211a8764fa187ab2a7d6668d1e7427dbdd80b09 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.creatis.insa-lyon.fr/pubgit/?p=clitk.git;a=commitdiff;h=d959a9ad92f360947d857261b8ebd758abf4992e

commit d959a9ad92f360947d857261b8ebd758abf4992e
Author: Romulo Pinho <romulo.pinho at lyon.unicancer.fr>
Date:   Thu Jan 26 13:46:11 2012 +0100

    accepts suffix for 4D mhd creation

diff --git a/scripts/create_mhd_4D_pattern.sh b/scripts/create_mhd_4D_pattern.sh
index 4d64347..2fa41d4 100755
--- a/scripts/create_mhd_4D_pattern.sh
+++ b/scripts/create_mhd_4D_pattern.sh
@@ -1,4 +1,4 @@
-#!/bin/sh +x
+#!/bin/sh
 
 ###############################################################################
 #
@@ -35,15 +35,18 @@ write_mhd_4D()
 #################################################
 if [ $# -lt 1 ]
 then
-  echo "Usage: $0 PATTERN"
+  echo "Usage: $0 PREFIX [SUFFIX]"
   exit 1
 fi
 
+prefix=$1
+suffix=$2
+
 dirname=`dirname $1`
 pattern=`basename $1`
 
-list_phase_file=`ls -1 $1*[0-9].mhd`
-nb_phase_file=`ls -1 $1*[0-9].mhd | wc -l`
+list_phase_file=`ls -1 $prefix*[0-9]*$suffix.mhd`
+nb_phase_file=`ls -1 $prefix*[0-9]*$suffix.mhd | wc -l`
 if [ $nb_phase_file = 0 ]
 then
   echo "Error: no phase found"
@@ -54,7 +57,7 @@ nbph=$nb_phase_file
 orig=`echo $list_phase_file | cut -f 1 -d ' '`
 listph=`echo $list_phase_file | sed 's:\.mhd:\.raw:g'`
 
-file_name_4D=`echo "${pattern}4D.mhd"`
+file_name_4D=`echo "${prefix}4D${suffix}.mhd"`
 
 write_mhd_4D $dirname
 echo "$dirname/$file_name_4D"

-----------------------------------------------------------------------

Summary of changes:
 scripts/create_mhd_4D_pattern.sh |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Clitk


More information about the Pubgit-commits-list mailing list