#!/bin/bash source ./configuration.sh # TXTCOLOR="RosyBrown" TXTCOLOR="Gray70" DDIR="frames/snapshot" ERR="WS/snap.error" IDXF="WS/snap.next" clock=$(head -1 $IDXF) nice -10 make CLOCK=$clock extsnap.png 2> $ERR errcode=$? if [ $errcode -ne 0 ] then echo '*** rendering fail ***' tail -22 $ERR sleep 35 exit 1 fi if [ -r WS/snapflag ] then tdate=$(date --utc +'%F %H:%M') frame=$(printf "k^%04d" $clock | tr '01' 'Ol') fname=$(printf "%s/%s.png" $DDIR $(echo "$tdate" | sed 's/ /+/')) texte=$(printf "%s utc" "$tdate" | tr '01' 'Ol') # echo $0 '=' $texte ' ' $clock $fname >> toto echo "making " $fname convert extsnap.png \ -fill $COLTEXT_B \ -font Courier-Bold \ -pointsize 22 \ -gravity North \ -annotate +126+15 "${texte}" \ -fill $COLTEXT_A \ -annotate +378+15 "${frame}" \ $fname rm WS/snapflag clock=$(( ( clock +1 ) % 2000 )) echo $clock > $IDXF grep 'Trace Time' $ERR sleep 5 else attente=$(( ($RANDOM % 99) + 99 )) echo '++++++ waiting for ' $attente "s." sleep $attente fi