summaryrefslogtreecommitdiff
path: root/regress/scp.sh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-06-17 15:18:32 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-06-17 15:18:32 +1000
commit8a2f1b353760922bc7336f7c4030e192e13dc018 (patch)
tree0b155e6ebadc874dcccb8d453722ab340f976420 /regress/scp.sh
parentaf16154b00b7f4cd935000f7b4f673e4c7795fb6 (diff)
- (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 'regress/scp.sh')
-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"
5 5
6#set -x 6#set -x
7 7
8# Figure out if diff understands "-N"
9if diff -N ${SRC}/scp.sh ${SRC}/scp.sh 2>/dev/null; then
10 DIFFOPT="-rN"
11else
12 DIFFOPT="-r"
13fi
14
8DATA=/bin/ls 15DATA=/bin/ls
9COPY=${OBJ}/copy 16COPY=${OBJ}/copy
10COPY2=${OBJ}/copy2 17COPY2=${OBJ}/copy2
@@ -48,14 +55,14 @@ scpclean
48rm -rf ${DIR2} 55rm -rf ${DIR2}
49cp ${DATA} ${DIR}/copy 56cp ${DATA} ${DIR}/copy
50$SCP $scpopts -r ${DIR} somehost:${DIR2} || fail "copy failed" 57$SCP $scpopts -r ${DIR} somehost:${DIR2} || fail "copy failed"
51diff -rN ${DIR} ${DIR2} || fail "corrupted copy" 58diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
52 59
53verbose "$tid: recursive remote dir to local dir" 60verbose "$tid: recursive remote dir to local dir"
54scpclean 61scpclean
55rm -rf ${DIR2} 62rm -rf ${DIR2}
56cp ${DATA} ${DIR}/copy 63cp ${DATA} ${DIR}/copy
57$SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed" 64$SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed"
58diff -rN ${DIR} ${DIR2} || fail "corrupted copy" 65diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
59 66
60for i in 0 1 2 3 4; do 67for i in 0 1 2 3 4; do
61 verbose "$tid: disallow bad server #$i" 68 verbose "$tid: disallow bad server #$i"