Add script for patching CM source