git.cweiske.de
/
munin-heatpump.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f19be01
)
more error checking for xsl path
author
Christian Weiske
<cweiske@cweiske.de>
Sun, 9 Dec 2012 19:56:45 +0000
(20:56 +0100)
committer
Christian Weiske
<cweiske@cweiske.de>
Sun, 9 Dec 2012 19:56:45 +0000
(20:56 +0100)
heatpump-dimplex-wpm_
patch
|
blob
|
history
diff --git
a/heatpump-dimplex-wpm_
b/heatpump-dimplex-wpm_
index 510f3f72ecd0c93e1ff9a3bc5c78648766f88123..169fd76063993a122bc1e0faaeddb01ae5c47324 100755
(executable)
--- a/
heatpump-dimplex-wpm_
+++ b/
heatpump-dimplex-wpm_
@@
-108,10
+108,20
@@
if [ "$ret" -ne 0 ]; then
exit 1
fi
exit 1
fi
-path="`dirname "$0"`"
-data=`echo "$xml" | xsltproc "$path/paths.xsl" -`; ret=$?
+xslfile=paths.xsl
+if [ ! -f "$xslfile" ]; then
+ shell="`readlink -f "$0"`"
+ path="`dirname "$0"`"
+ xslfile="$path/paths.xsl"
+ if [ ! -f "$xslfile" ]; then
+ echo 'Could not find paths.xsl'
+ exit 2
+ fi
+fi
+
+data=`echo "$xml" | xsltproc "$xslfile" -`; ret=$?
if [ "$ret" -ne 0 ]; then
if [ "$ret" -ne 0 ]; then
- echo
"Error running xsltproc"
+ echo
'Error running xsltproc'
exit 2
fi
exit 2
fi