#!/bin/sh
#
# fetch:
#
# Copyright (c) 2002 James McKenzie <james@fishsoup.dhs.org>,
# All rights reserved.
#
# $Id:$
#
# $Log:$
#

mkdir -p NOBACKUP

. ./shifttime

H=..

B=$H/bin

if [ ! -f tnext ]; then
  touch -t 200001010101.00 tnext
fi

touch tnow

if [ tnow -nt tnext ]; then
  make term

  echo drawing terminator

  $B/term NOBACKUP/join-day.ppm NOBACKUP/join-night.ppm ${TIME} > NOBACKUP/term.ppm || /bin/rm -f NOBACKUP/term.ppm

  touch tnext -t `date -d 'now+10mins' '+%Y%m%d%H%M.%S'`

fi





