summaryrefslogtreecommitdiffstats
path: root/regress/scp.sh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-06-17 07:18:32 +0200
committerDarren Tucker <dtucker@zip.com.au>2004-06-17 07:18:32 +0200
commit8a2f1b353760922bc7336f7c4030e192e13dc018 (patch)
tree0b155e6ebadc874dcccb8d453722ab340f976420 /regress/scp.sh
parentAdd missing regress. (diff)
downloadopenssh-8a2f1b353760922bc7336f7c4030e192e13dc018.tar.xz
openssh-8a2f1b353760922bc7336f7c4030e192e13dc018.zip
- (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@
Diffstat (limited to '')
-rw-r--r--regress/scp.sh11
1 files changed, 9 insertions, 2 deletions
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"