Fix regenerate.sh script.