]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
check whether diff accepts -N
authorDamien Miller <djm@mindrot.org>
Mon, 13 Oct 2025 03:33:04 +0000 (14:33 +1100)
committerDamien Miller <djm@mindrot.org>
Mon, 13 Oct 2025 03:33:04 +0000 (14:33 +1100)
regress/scp3.sh

index ef316c099414005c984a27d7792264c37acc0495..d42abc2dc8242bea9562f1273c4996f93f1e3c2a 100644 (file)
@@ -8,6 +8,11 @@ DIR=${COPY}.dd
 DIR2=${COPY}.dd2
 DIFFOPT="-rN"
 
+# Figure out if diff does not understand "-N"
+if ! diff -N ${SRC}/scp.sh ${SRC}/scp.sh 2>/dev/null; then
+       DIFFOPT="-r"
+fi
+
 maybe_add_scp_path_to_sshd
 
 SRC=`dirname ${SCRIPT}`