From 8a2f1b353760922bc7336f7c4030e192e13dc018 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 17 Jun 2004 15:18:32 +1000 Subject: - (dtucker) [regress/scp.sh] diff -N is not portable (but needed for some platforms), so test if diff understands it. Pointed out by tim@, ok djm@ --- ChangeLog | 6 +++++- regress/scp.sh | 11 +++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 90447f320..acb0e26dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +20040617 + - (dtucker) [regress/scp.sh] diff -N is not portable (but needed for some + platforms), so test if diff understands it. Pointed out by tim@, ok djm@ + 20040616 - (dtucker) [openbsd-compat/port-aix.c] Expand whitespace -> tabs. No code changes. @@ -1251,4 +1255,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3398 2004/06/16 13:24:19 dtucker Exp $ +$Id: ChangeLog,v 1.3399 2004/06/17 05:18:32 dtucker Exp $ diff --git a/regress/scp.sh b/regress/scp.sh index cda01868a..703cc0893 100644 --- a/regress/scp.sh +++ b/regress/scp.sh @@ -5,6 +5,13 @@ tid="scp" #set -x +# Figure out if diff understands "-N" +if diff -N ${SRC}/scp.sh ${SRC}/scp.sh 2>/dev/null; then + DIFFOPT="-rN" +else + DIFFOPT="-r" +fi + DATA=/bin/ls COPY=${OBJ}/copy COPY2=${OBJ}/copy2 @@ -48,14 +55,14 @@ scpclean rm -rf ${DIR2} cp ${DATA} ${DIR}/copy $SCP $scpopts -r ${DIR} somehost:${DIR2} || fail "copy failed" -diff -rN ${DIR} ${DIR2} || fail "corrupted copy" +diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy" verbose "$tid: recursive remote dir to local dir" scpclean rm -rf ${DIR2} cp ${DATA} ${DIR}/copy $SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed" -diff -rN ${DIR} ${DIR2} || fail "corrupted copy" +diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy" for i in 0 1 2 3 4; do verbose "$tid: disallow bad server #$i" -- cgit v1.2.3