Update the regenerate.sh script