script to patch and build reop