mbrukman / autogen

Automatically generate boilerplate license comments.
Apache License 2.0
98 stars 27 forks source link

Remove subprocessing for inline modification #38

Closed mbrukman closed 7 years ago

mbrukman commented 7 years ago

This was done because the script only generated the final output to stdout with no way to capture it to redirect into a file. It also made it hard to add any additional functionality without breaking the inline modification because we had to do a bidirectional conversion of flags -> variables and then variables -> flags for the re-execution of autogen.

This change encloses the entire output in a function, such that it's easy to call either to output to stdout or to capture the output and prepend to a file.