/usr/lib/petscdir/3.7.7/x86_64-linux-gnu-real-debug/bin/petscdiff is in libpetsc3.7.7-dbg 3.7.7+dfsg1-2build5.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #! /bin/sh -f
#
# Replaces floating point numbers with XXX and then does a diff
#
export RM="`grep 'RM =' ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/petscvariables | sed s/'RM ='//g`"
export SED="`grep 'SED =' ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/petscvariables | sed s/'SED ='//g`"
export DIFF="`grep 'DIFF =' ${PETSC_DIR}/${PETSC_ARCH}/lib/petsc/conf/petscvariables | sed s/'DIFF ='//g`"
export f=$1
if [ "JOE${f}" = "JOE-" ]; then
export f=`mktemp -t tmp.XXXXX` ;
$(cat /dev/stdin > ${f})
fi
${SED} "s/< [0-9][0-9]*\.*[0-9]*[eE][-+][0-9][0-9]*/XXX/g" $f | ${SED} "s/[-]*[0-9][0-9]*\.*[0-9]*[eE][-+][0-9][0-9]*/XXX/g" | ${SED} "s/[-]*[0-9][0-9]*\.[0-9]*/XXX/g" | ${SED} "s/ \*\*\*\*\*\*\*\*\* /XXX/g" > tmpA
${SED} "s/< [0-9][0-9]*\.*[0-9]*[eE][-+][0-9][0-9]*/XXX/g" $2 | ${SED} "s/[-]*[0-9][0-9]*\.*[0-9]*[eE][-+][0-9][0-9]*/XXX/g" | ${SED} "s/[-]*[0-9][0-9]*\.[0-9]*/XXX/g" | ${SED} "s/ \*\*\*\*\*\*\*\*\* /XXX/g" > tmpB
${DIFF} tmpA tmpB > /dev/null
if [ $? -ne 0 ]; then
${DIFF} ${f} $2
${RM} -f tmpA tmpB
if [ "JOE${1}" = "JOE-" ]; then
${RM} -f ${f}
fi
exit 1;
else
${RM} -f tmpA tmpB
if [ "JOE${1}" = "JOE-" ]; then
${RM} -f ${f}
fi
exit 0;
fi
|