Generates a cleanup bash script.