mbrukman / autogen

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

Clean up in-place file editing to prepend license. #28

Closed mbrukman closed 7 years ago

mbrukman commented 7 years ago

Fix ed method to not source in input (as that will also run commands); instead, read from a temporary file.

Add an alternative using ex, which is really vim, and which is a whitelisted package, which does not require sudo to install.

Finally, bring back the original approach of using temporary files, but instead of using mv, use cat as it will preserve file ownership, group, and permissions.

Also updated Travis config to run all tests with each of these methods.