html_cmp revision 1.4
11.1Stls#! /bin/sh 21.1Stls# 31.4Smrg# $eterna: html_cmp,v 1.9 2011/11/17 22:18:02 mrg Exp $ 41.1Stls# 51.1Stls# like cmp(1) but compares to files after making their `Date: ' headers 61.1Stls# the same, to allow `now' and `then' to work properly. it also tries 71.1Stls# to find servername's that might be the local host and converts those 81.1Stls# as well.. 91.1Stls# 101.1Stls# it must be called like `cmp file1 file1' *only*. 111.1Stls 121.1Stlsh=`hostname || uname -n` 131.1Stls 141.1Stlssedcmd="s/^Date: .*/Date: nowish/; 151.1Stls s/^Last-Modified: .*/Last-Modified: nowish/; 161.1Stls s/[a-zA-Z0-9-]*\.eterna\.com\.au/$h/g; 171.1Stls s/^Server: .*/^Server: bozotic HTTP server version 5.08/; 181.1Stls s/^Content-Length: .*/Content-Length: 223/;" 191.1Stls 201.4Smrgsed -e "$sedcmd" < "$1" > "f1.tmp.$$" 211.4Smrgsed -e "$sedcmd" < "$2" > "f2.tmp.$$" 221.1Stls 231.4Smrgcmp -s "f1.tmp.$$" "f2.tmp.$$" 241.1Stlsrv=$? 251.4Smrgrm -f "f1.tmp.$$" "f2.tmp.$$" 261.1Stls 271.1Stlsexit $rv 28