Standalone pregen script.