#!/bin/sh # Copyright for the Uniform Repository Service (c) 1997, # by Gerald Banon. All rights reserved. # Version 1.1 # checkchange # QUERY_STRING = repository & last change pid=$$ rp=`echo $QUERY_STRING | awk -F\& '{ print $1 }'` lc1=`echo $QUERY_STRING | awk -F\& '{ print $2 }'` #rp=`echo $rp | sed 's/%3A/:/g' | sed 's/%2F/\//g'` #lc1=`echo $lc1 | sed 's/%3A/:/g' | sed 's/%2F/\//g'` col=../../../../.. serv=dpi.inpe.br/banon/1995/08.08.00.00 cd $PATH_INFO/col/$serv/not_sent # level 0 from not_sent mkdir .t$pid find \ $col/$rp/doc -newer $col/$rp/.reserved/last_change -print >.t$pid/ax if test -s .t$pid/ax then li=`cat .t$pid/ax` lc2=`ls -lt $li | sed -n '1p' | sed 's/ \.\.\/.*$//' | \ sed 's/ /+/g'` # lc (last change) else lc2=\ `ls -l $col/$rp/.reserved/last_change | sed 's/ \.\.\/.*$//' | \ sed 's/ /+/g'` # lc (last change) fi if test "$lc1" = "$lc2" then cat <<% Content-Type: text/html URLib access control

During your visit the document has not been changed.

% else cat <<% Content-Type: text/html URLib access control

We are sorry, during your visit the document has been changed.

% fi rm -r .t$pid