#!/bin/sh -eux year=${year:-$(date +%Y)} month=${month:-$(date +%m)} day=${day-} host=${host:-cubie} user=${user:-root} mkdir -p rrd/"$year" ssh "$host" ${user:+-l "$user"} \ rrdtool dump \~user/work/tool/air/rrd/"$year"/"$month".rrd | rrdtool restore -f - rrd/"$year"/"$month".rrd make NO_INO=set view/"$year"/"$month"/${day:+$day/}png make NO_INO=set view/"$year"/"$month"/${day:+$day/}html5