Add a script to generate patches