From: Linus Torvalds Date: Sat, 12 May 2012 19:53:41 +0000 (-0700) Subject: Allow overriding the default xslt path X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=058b84cca0f876bf2221e248e4854905b0705210;p=ext%2Fsubsurface.git 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 --- 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;