Update generate.sh with conditional copy.
Merge pull request #5 from pmienk/master

Update generate.sh with conditional copy.