Created
January 13, 2013 23:15
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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