From: Dimitrios Apostolou Date: Sun, 29 Mar 2015 22:15:34 +0000 (+0200) Subject: No need to customize the paths. X-Git-Tag: v11.1.4~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aae0acc8623483a7bb8a2a7ab35210c798aada53;p=sysstat No need to customize the paths. --- diff --git a/contrib/sargraph/sargraph b/contrib/sargraph/sargraph index 5d5e3af..4738299 100755 --- a/contrib/sargraph/sargraph +++ b/contrib/sargraph/sargraph @@ -2,16 +2,19 @@ # sargraph - a simple sketch on how to generate graphs from sadf XML output # by Lans.Carstensen@dreamworks.com -# 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]*'