#!/bin/bash

if [ -e /tmp/gutenbach/current_queue_temp ]; then
    rm /tmp/gutenbach/current_queue_temp
fi

while true; do
    time=$(date)
    echo "This is a work in progress!  Please send bugs to jhamrick." >> /tmp/gutenbach/current_queue_temp
    echo "" >> /tmp/gutenbach/current_queue_temp
    echo "As of $time:" >> /tmp/gutenbach/current_queue_temp
    echo "" >> /tmp/gutenbach/current_queue_temp
    /usr/lib/gutenbach/queue/queue >> /tmp/gutenbach/current_queue_temp
    mv /tmp/gutenbach/current_queue_temp /tmp/gutenbach/current_queue
    chmod ugoa+r /tmp/gutenbach/current_queue
done