#!/bin/sh
# Diff  ``without R version''
f1=${1}
f2=${2}
exitstatus=${3}

egrepv='(^Version|^Number of.*:|^Type|^R : Copyright|^Time '
if test -n "`grep primitive-funs $f1`"; then
  egrepv=${egrepv}'|^\[1\] [19][0-9][0-9])'
else
  egrepv=${egrepv}')'
fi

tmpfile=${TMPDIR:-/tmp}/${f1}-d.${$}

egrep -v "${egrepv}" ${f1} > ${tmpfile}
(egrep -v "${egrepv}" ${f2} | diff -bw ${tmpfile} - ) && exitstatus=0

rm -f ${tmpfile}
exit ${exitstatus}
