[REQ] Harden `new.sh` to create directory structures if they don't already exist
Is your feature request related to a problem? Please describe.
I'm using the new.sh script to create a new custom generator, but I'm doing so outside of the context of the openapi-generator repository. The script breaks in a few locations since it it assumes that a directory structure already exists.
I've gone through my copy and added a series of mkdir -p commands before various echo and cat commands, but wanted to suggest that these lines get added to the script for other devs who might want to create custom templates without the baggage of an entire fork.
Describe the solution you'd like
Add in mkdir -p commands to new.sh before writing to a file that assumes a given directory exists.
Describe alternatives you've considered
The alternatives are:
- Bespoke manual editing of
new.sh - Running it in the context of the
openapi-generatorrepository.
Additional context
I'd be happy to open a PR for this if it's acceptable.
thanks for the feedback
can you please open a PR to start with and we will review accordingly?