Generalize the template resouces copy process.