From 058b84cca0f876bf2221e248e4854905b0705210 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 12 May 2012 12:53:41 -0700 Subject: [PATCH] Allow overriding the default xslt path It's very annoying to have to do "make install" to test a new xslt file, just because the default xslt path has the standard install path as the first entry. At the same time, we do want to default to just using the standard install location first. So to allow both testing, and having a nice sane default, just add support for a SUBSURFACE_XSLT_PATH environment variable that overrides the default one if it exists. So then you can just do SUBSURFACE_XSLT_PATH=xslt ./subsurface to run subsurface from inside the git tree itself, using the current files in the git xslt subdirectory. Signed-off-by: Linus Torvalds --- parse-xml.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/parse-xml.c b/parse-xml.c index 4940233..761cc3b 100644 --- a/parse-xml.c +++ b/parse-xml.c @@ -1462,7 +1462,11 @@ static xsltStylesheetPtr try_get_stylesheet(const char *path, int len, const cha static xsltStylesheetPtr get_stylesheet(const char *name) { - const char *path = xslt_path, *next; + const char *path, *next; + + path = getenv("SUBSURFACE_XSLT_PATH"); + if (!path) + path = xslt_path; do { int len; -- 2.45.2