]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Make diff invocation more portable.
authordtucker@openbsd.org <dtucker@openbsd.org>
Fri, 6 Aug 2021 09:00:18 +0000 (09:00 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 6 Aug 2021 09:33:31 +0000 (19:33 +1000)
POSIX does not require diff to have -N, so compare in both directions
with just -r, which should catch missing files in either directory.

OpenBSD-Regress-ID: 0e2ec8594556a6f369ed5a0a90c6806419b845f7

regress/scp3.sh

index e5493ee8003739a499a19a601b4cfb9e0894d905..53db81d2b2eb5750efa40da5b15995b2bf085ad6 100644 (file)
@@ -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