Skip to content

Instantly share code, notes, and snippets.

@mattyb149
Created January 13, 2013 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattyb149/4526739 to your computer and use it in GitHub Desktop.
Save mattyb149/4526739 to your computer and use it in GitHub Desktop.
A simple helper script to show how changes to files in the old PDI/Kettle project structure will map to the new project structure.
def module_map = ['src-core':'core/src',
'src-db':'db/src',
'src-dbdialog':'dbdialog/src',
'src':'engine/src',
'src-jdbc':'jdbc/src',
'src-ui':'ui/src',
'src-plugins':'plugins',
'libext':'lib',
'ui':'assembly/package-res/ui']
'svn status'.execute().text.eachLine {line ->
def svn_op = line.charAt(0)
def old_fname = line.substring(1).trim()
def path_segments = old_fname.split('/')
def old_module = path_segments[0]
def new_module = module_map.get(old_module)
def file_mapping = new_module ? "$old_fname -> ${new_module}/${path_segments[1..-1].join('/')}" : old_fname
println "${svn_op}\t${file_mapping}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment