summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2021-08-06 09:00:19 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2021-08-06 09:00:19 +0000
commit4f21b97f24315bb28d0f6974e3d807c7d015045f (patch)
tree4c4a3f05ff1091f20a6257e9e15d3dcb44753165
parent81bfaed1ab6042430d1f82a7c997a2cda570942d (diff)
Make diff invocation more portable. POSIX does not require diff to have -N,
so compare in both directions with just -r, which should catch missing files in either directory.
-rw-r--r--regress/usr.bin/ssh/scp3.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/regress/usr.bin/ssh/scp3.sh b/regress/usr.bin/ssh/scp3.sh
index e5493ee8003..53db81d2b2e 100644
--- a/regress/usr.bin/ssh/scp3.sh
+++ b/regress/usr.bin/ssh/scp3.sh
@@ -1,4 +1,4 @@
-# $OpenBSD: scp3.sh,v 1.1 2021/08/04 21:28:00 djm Exp $
+# $OpenBSD: scp3.sh,v 1.2 2021/08/06 09:00:18 dtucker Exp $
# Placed in the Public Domain.
tid="scp3"
@@ -44,7 +44,8 @@ for mode in scp ; do
rm -rf ${DIR2}
cp ${DATA} ${DIR}/copy
$SCP $scpopts -3r hostA:${DIR} hostB:${DIR2} || fail "copy failed"
- diff -rN ${DIR} ${DIR2} || fail "corrupted copy"
+ diff -r ${DIR} ${DIR2} || fail "corrupted copy"
+ diff -r ${DIR2} ${DIR} || fail "corrupted copy"
verbose "$tag: detect non-directory target"
scpclean