generate web and middle patch generating script