Add support for pre-install scripts
Merge branch 'cm/pre-install-scripts'