Oh, I had missed the patch.
Please rename the script to couchenv.
Please change the help output to be more helpful:
The $basename command runs the %package_name% environment tool.
When %package_name% is installed, certain environment variables are set.
This script will display the current values of those variables.
The exit status is 0 for success or 1 for failure.
Please support --V, --version for printing version information.
Please support -h, --help for printing help information.
Please remove the -? option.
Please make the wording of the help output start with:
-h display a short help message and exit
-V display version information and exit
This is essential to main consistency between the output of the scripts we ship.
Please change the wording of the help output the match this.
As an example:
--logfile Display log file path
Please change the flags to mirror the variable name precisely:
Please add the new script to the dist_man1_MANS variable so that we build a man page for it.
Please check that the new -h, -V output produces a sensible looking man page.
Compare this with the man page for the couched command.
I would recommend keeping with the variable names as they exist:
So from this:
As with the help output, it might seem like shortening them helps. I would argue that given sufficient knowledge of either CouchDB or Autotools, the originals make more sense. I know what the localstatelibdir is, because I have worked with that variable so much. The same is not necessarily true for dbdir. We should keep with the existing values throughout the code and our external interfaces to that code.
Other than that, this is exactly how I would have implemented it.