Lines Matching +full:local +full:- +full:dir
6 #set -x
8 # Figure out if diff understands "-N"
9 if diff -N ${SRC}/scp.sh ${SRC}/scp.sh 2>/dev/null; then
10 DIFFOPT="-rN"
12 DIFFOPT="-r"
16 DIR=${COPY}.dd
20 cp ${SRC}/scp-ssh-wrapper.sh ${OBJ}/scp-ssh-wrapper.scp
21 chmod 755 ${OBJ}/scp-ssh-wrapper.scp
22 scpopts="-q -S ${OBJ}/scp-ssh-wrapper.scp"
23 export SCP # used in scp-ssh-wrapper.scp
26 rm -rf ${COPY} ${COPY2} ${DIR} ${DIR2}
27 mkdir ${DIR} ${DIR2}
30 verbose "$tid: simple copy local file to local file"
35 verbose "$tid: simple copy local file to remote file"
40 verbose "$tid: simple copy remote file to local file"
45 verbose "$tid: simple copy local file to remote dir"
48 $SCP $scpopts ${COPY} somehost:${DIR} || fail "copy failed"
49 cmp ${COPY} ${DIR}/copy || fail "corrupted copy"
51 verbose "$tid: simple copy local file to local dir"
54 $SCP $scpopts ${COPY} ${DIR} || fail "copy failed"
55 cmp ${COPY} ${DIR}/copy || fail "corrupted copy"
57 verbose "$tid: simple copy remote file to local dir"
60 $SCP $scpopts somehost:${COPY} ${DIR} || fail "copy failed"
61 cmp ${COPY} ${DIR}/copy || fail "corrupted copy"
63 verbose "$tid: recursive local dir to remote dir"
65 rm -rf ${DIR2}
66 cp ${DATA} ${DIR}/copy
67 $SCP $scpopts -r ${DIR} somehost:${DIR2} || fail "copy failed"
68 diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
70 verbose "$tid: recursive local dir to local dir"
72 rm -rf ${DIR2}
73 cp ${DATA} ${DIR}/copy
74 $SCP $scpopts -r ${DIR} ${DIR2} || fail "copy failed"
75 diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
77 verbose "$tid: recursive remote dir to local dir"
79 rm -rf ${DIR2}
80 cp ${DATA} ${DIR}/copy
81 $SCP $scpopts -r somehost:${DIR} ${DIR2} || fail "copy failed"
82 diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
86 (cd ${DIR} && \
89 [ ! -f metachartest ] ) || fail "shell metacharacters"
91 if [ ! -z "$SUDO" ]; then
92 verbose "$tid: skipped file after scp -p with failed chown+utimes"
94 cp -p ${DATA} ${DIR}/copy
95 cp -p ${DATA} ${DIR}/copy2
99 $SCP -p $scpopts somehost:${DIR}/\* ${DIR2} >/dev/null 2>&1
100 $SUDO diff ${DIFFOPT} ${DIR} ${DIR2} || fail "corrupted copy"
107 export DIR SCPTESTMODE
109 $SCP $scpopts somehost:${DATA} ${DIR} >/dev/null 2>/dev/null
110 [ -d {$DIR}/rootpathdir ] && fail "allows dir relative to root dir"
111 [ -d ${DIR}/dotpathdir ] && fail "allows dir creation in non-recursive mode"
114 $SCP -r $scpopts somehost:${DATA} ${DIR2} >/dev/null 2>/dev/null
115 [ -d ${DIR}/dotpathdir ] && fail "allows dir creation outside of subdir"
118 verbose "$tid: detect non-directory target"
126 rm -f ${OBJ}/scp-ssh-wrapper.scp