Inject system variables
Shemnei opened this issue · comments
Maybe punktf should inject some general system variables for templates to use. These will only be accessible by the current process:
PUNKTF_OS
: OS running the punktf process, like windows, unix, ...PUNKTF_TARGET
: Target directory for the profilePUNKTF_SOURCE
: Source directory for punktf
Closed on cleanup
with 52ed8e5.
The variables are injected as system environment variables local to that process.
The following are implemented:
PUNKTF_ARCH
: Architecture of the system which compiledpunktf
PUNKTF_OS
: Operating system of the system which compiledpunktf
PUNKTF_FAMILY
: Family of the operating system which compiledpunktf
The values for these variables are available at https://doc.rust-lang.org/reference/conditional-compilation.html.