This commit is contained in:
rsc 2005-03-21 07:37:34 +00:00
parent e961291897
commit b8c9f31785
6 changed files with 60 additions and 32 deletions

View file

@ -0,0 +1,21 @@
ns=`{namespace}
if(</dev/null dial 'unix!'^$ns/$1 >[2]/dev/null)
f=$f^9p
fn mysftp {
if(! </dev/null dial 'unix!'^$ns/$1.sftp >[2]/dev/null){
echo 'caching sftp' $1 >[1=2]
sftpcache -D $1
}
if(! </dev/null dial 'unix!'^$ns/$1.sftp >[2]/dev/null){
sftp -b /dev/stdin $1
}
if not{
{cat; echo DONE} | dial -e 'unix!'^$ns/$1.sftp
}
}
t=/tmp/netfilexxx.$pid.$USER
fn sigexit { rm -f $t $t.e $t.e2 }