]> Creatis software - clitk.git/blob - make_new_tool.sh
gradient magnitude tool
[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         sed -i "" "s/FooImage/$1/ig" ${i/FooImage/$1}
16     else
17         sed -i "s/FooImage/$1/ig" ${i/FooImage/$1}
18     fi
19 done
20 echo "Done!"
21 echo "Don't forget to add your new tool to the various CMakeLists.txt files."