diff options
author | rsc <devnull@localhost> | 2005-03-21 07:37:34 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-03-21 07:37:34 +0000 |
commit | b8c9f31785f3243a52432023d4d555d490963769 (patch) | |
tree | 4a55c22d8af3e61f4aa4528c4aefb03fd684769c /src/cmd/netfiles/netfileput | |
parent | e96129189712a83de71d45cbc852a54c5960d575 (diff) | |
download | plan9port-b8c9f31785f3243a52432023d4d555d490963769.tar.gz plan9port-b8c9f31785f3243a52432023d4d555d490963769.tar.bz2 plan9port-b8c9f31785f3243a52432023d4d555d490963769.zip |
new
Diffstat (limited to 'src/cmd/netfiles/netfileput')
-rwxr-xr-x | src/cmd/netfiles/netfileput | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/cmd/netfiles/netfileput b/src/cmd/netfiles/netfileput index 7b90124d..84cdf610 100755 --- a/src/cmd/netfiles/netfileput +++ b/src/cmd/netfiles/netfileput @@ -6,17 +6,18 @@ if(! ~ $#* 2){ } f=putfile -ns=`{namespace} -if(u test -S $ns/$1) - f=$f^9p -t=/tmp/netget.$pid.$USER -fn sigexit { rm -f $t } +. netfilelib.rc $1 fn putfile{ cat >$t - if(! echo put $t $2 | sftp -b /dev/stdin $1 >/dev/null) + if(! 9 echo -put $t $2 | mysftp $1 >$t.e >[2=1]) exit 1 + egrep -v '^Uploading' $t.e >$t.e2 + if(test -s $t.e2){ + cat $t.e >[1=2] + exit 1 + } } fn putfile9p{ if(! 9p write $1/$2) @@ -25,3 +26,4 @@ fn putfile9p{ $f $1 $2 exit 0 + |