Closed michaelkrieger closed 5 years ago
I definitely agree this would be a useful feature. But I think using the name of the script file as the config file prefix could be confusing. The config file should have a consistent name, or even be specified directly.
I can think of a few alternative options:
[--config <file>]
)
SPKI_*
for specific variablesSPKI_CONFIG_FILE
to run a filespki.conf
in the working directory and the script directoryIn either case, it should definitely be documented in the readme, and a note added in the file itself to indicate the variables could be overwritten.
I'm leaning towards the second one as it seems the most versatile and is a common config practice. Thoughts?
Implemented via e4bcd95
An external configuration file can be useful:
This patch will obey symbolic links, as well as any changes to the name of the script so either of these methods could be used:
or
and it will override these config settings for when it's run from a script in that folder. This works whether you run it in the current folder or using a relative or absolute path. If the file doesn't exist, it will use the old behaviour.