summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-05-12 12:53:41 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-05-12 12:53:41 -0700
commit058b84cca0f876bf2221e248e4854905b0705210 (patch)
tree3a1fbd2059cd2aa28c80710178b23e1496f293cf
parentb2e4ca552faf9b91989559c99edddd70ccb11b9d (diff)
downloadsubsurface-058b84cca0f876bf2221e248e4854905b0705210.tar.gz
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 <torvalds@linux-foundation.org>
-rw-r--r--parse-xml.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/parse-xml.c b/parse-xml.c
index 494023387..761cc3b41 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;