]> granicus.if.org Git - sysstat/commitdiff
No need to customize the paths.
authorDimitrios Apostolou <jimis@gmx.net>
Sun, 29 Mar 2015 22:15:34 +0000 (00:15 +0200)
committerDimitrios Apostolou <jimis@gmx.net>
Sun, 29 Mar 2015 22:53:15 +0000 (00:53 +0200)
contrib/sargraph/sargraph

index 5d5e3afbcaddccc17cc4df62e0fa027fb53e761f..473829998ac2d71d25d5304549a22e30e120bc43 100755 (executable)
@@ -2,16 +2,19 @@
 # sargraph - a simple sketch on how to generate graphs from sadf XML output
 # by Lans.Carstensen@dreamworks.com <Lans Carstensen>
 
-# Our dependencies
-ZENITY="/usr/bin/zenity"
-XSLTPROC="/usr/bin/xsltproc"
-SADF="/usr/local/bin/sadf"
-GNUPLOT="/usr/bin/gnuplot"
-MKTEMP="/bin/mktemp"
-FIND="/usr/bin/find"
-SORT="/bin/sort"
-CUT="/bin/cut"
-GZIP="/usr/bin/gzip"
+# Our dependencies - bail out if they are not found
+
+set -e
+ZENITY=`which zenity`
+XSLTPROC=`which xsltproc`
+SADF=`which sadf`
+GNUPLOT=`which gnuplot`
+MKTEMP=`which mktemp`
+FIND=`which find`
+SORT=`which sort`
+CUT=`which cut`
+GZIP=`which gzip`
+set +e
 
 SA_PATH="/var/log/sa"
 SA_FILEMASK='sa[0-9][0-9]*'