How to currently write command line tools is demonstrated in the MITK Diffusion Module, the documentation:
http://docs.mitk.org/nightly/MiniAppCommandLineToolHowToPage.html
should be updated accordingly.
the bash script it the bottom is obsolete,
this is now generated automatically.