Generate (gen) is a command line script template automation tool written in bash 3.2+
. Generate automates the creation of script files, modifies file permissions, inputs custom and default script templates, and launches your favorite editor seamlessly.
- Improved
-c
option.- Custom modes are now sent directly to
chmod
and error handling is done there (within thecreate_file
function)
- Custom modes are now sent directly to
- Added
-r
option to make files read_only (after initial write).- The primary use case that prompted this addition was needing to copy/paste
pem
keys for AWS EC2 instances (which require400
permissions).
- The primary use case that prompted this addition was needing to copy/paste
- Added support for configuration file.
- Using the
Makefile
install,gen.conf
is installed to~/.config/gen
and populated with the variables used bygen
to determine application behavior. This provides and easy place to configure default editors, or set custom mode bits, etc. - Except for
editor
&mode
; the other variables available can be set totrue
andgen
will behave as though the corresponding command line options were selected. Command line options given at run-time will over-ride this config file.
- Using the
- Continued bug testing/verifying functionality across Linux/BSD/MacOS.
Please send me any ideas for increasing portability, or adding features!