utils: Allow users to define LTTNG_MANPATH
authorOlivier Dion <odion@efficios.com>
Mon, 2 Oct 2023 19:09:44 +0000 (15:09 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 2 Oct 2023 19:34:48 +0000 (15:34 -0400)
commitef4a570db1fbc6ffa5f645e76c4cf25e8098aee1
treecb750e2c1e09f475f2cbb8104af193f9b8faf85a
parent46d51dbdc8b9c93871c34416006cf7f28b987c90
utils: Allow users to define LTTNG_MANPATH

Currently, the configured value `MANPATH` is used when executing `man`.
This forces `lttng --help` to use man pages where they will be
installed, even with the `pre-inst-env` script.

Instead, let the user provide a `LTTNG_MANPATH` environment variable. If
not defined, fallback to the configured `MANPATH`.

This allows developers to do:

  $ ./pre-inst-env lttng --help

to read the locally generated man pages where the `pre-inst-env` script
was generated.

Also adding the `LTTNG_MAN_BIN_PATH` to `pre-inst-env` since `man` could
be installed someplace else.

Change-Id: I32d9af480737bb80732dc5d690f947242aacac4f
Signed-off-by: Olivier Dion <odion@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
pre-inst-env.in
src/common/defaults.hpp
src/common/utils.cpp
This page took 0.025246 seconds and 4 git commands to generate.