5 if [[ "${@/noup}" != "$@" ]]
7 echo "no update attempted"
11 if [ "$state" == "up" ]
13 ssh basil.dsg.cs.tcd.ie scp loradtn@tunloradtn:/var/log/battery.log .
14 scp basil.dsg.cs.tcd.ie:battery.log .
15 ./battery-seds.sh battery.log >sedded-battery.log
22 if [[ "${@/today}" != "$@" ]]
24 today=`date --rfc-3339=date`
26 | sed -e 's/2017-01-01/'$today'/' \
27 | sed -e 's/2017-02-28/'$today'/' \
28 | sed -e 's/loradtn.png/loradtn-'$today'.png/' \
29 >daily/loradtn-$today.gpl
30 gnuplot daily/loradtn-$today.gpl
31 mv loradtn-$today.png daily
32 hg add daily/loradtn-$today.*
38 if [ "$others" != "" ]
40 # assume parameter is nicely formed date
41 theday=`echo $others | sed -e 's/ //g'`
43 | sed -e 's/2017-01-01/'$theday'/' \
44 | sed -e 's/2017-02-28/'$theday'/' \
45 | sed -e 's/loradtn.png/loradtn-'$theday'.png/' \
46 >daily/loradtn-$theday.gpl
47 gnuplot daily/loradtn-$theday.gpl
48 mv loradtn-$theday.png daily
49 hg add daily/loradtn-$theday.*
51 # generate new overview