3 ANALYZE=<%= @analyze_bin %>
4 LOGDIR=<%= @input_dir %>
5 OUTDIR=<%= @output_dir %>
6 if [ -z "$DATE" ]; then
7 DATE=`date -d "2 days ago" "+%Y-%m-%d"`
9 TMPDIR=`mktemp -d -t tmp.XXXXXXXXX`
17 trap clean_up 0 HUP INT TERM
21 nice -n 19 $ANALYZE $LOGDIR/*-${DATE}.xz > analyze.log
22 if [ -f tiles.txt ]; then
23 nice -n 19 xz -z tiles.txt
24 mv tiles.txt.xz $OUTDIR/tiles-${DATE}.txt.xz