]> Creatis software - clitk.git/blob - make_new_tool.sh
Debug RTStruct conversion with empty struc
[clitk.git] / make_new_tool.sh
1 #!/bin/bash
2
3 if [ $# -ne 1 ]
4 then
5   echo "Usage: `basename $0` ToolName"
6   exit 1
7 fi
8
9 find tools -name "clitkFooImage*" |
10 while read i
11 do
12     cp $i ${i/FooImage/$1}
13     if test "$(uname)" = "Darwin"
14     then
15         echo $(pwd)
16         echo sed -i "" "s/FooImage/$1/g" ${i/FooImage/$1}
17         sed -i "" "s/FooImage/$1/g" ${i/FooImage/$1}
18     else
19         sed -i "s/FooImage/$1/ig" ${i/FooImage/$1}
20     fi
21 done
22 echo "Done!"
23 echo "Don't forget to add your new tool to the various CMakeLists.txt files."