URI: 
       twill install from src dir - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 72fd2f881907db5e367ffee1fcecb737c44a0090
   DIR parent 4c79af3977f1849f246ae2ce347cd7e6376cff5b
  HTML Author: rsc <devnull@localhost>
       Date:   Fri, 18 Mar 2005 19:29:47 +0000
       
       will install from src dir
       
       Diffstat:
         D bin/netfileget                      |      45 -------------------------------
         D bin/netfileput                      |      27 ---------------------------
         D bin/netfilestat                     |      52 -------------------------------
       
       3 files changed, 0 insertions(+), 124 deletions(-)
       ---
   DIR diff --git a/bin/netfileget b/bin/netfileget
       t@@ -1,45 +0,0 @@
       -#!/usr/local/plan9/bin/rc
       -
       -f=getfile
       -if(~ $1 -d){
       -        f=getdir
       -        shift
       -}
       -
       -if(! ~ $#* 2){
       -        echo 'usage: netget [-d] system path' >[1=2]
       -        exit usage
       -}
       -
       -ns=`{namespace}
       -if(u test -S $ns/$1)
       -        f=$f^9p
       -
       -t=/tmp/netget.$pid.$USER
       -fn sigexit { rm -f $t }
       -
       -fn getfile {
       -        rm -f $t
       -        if(! echo get $2 $t | sftp -b - $1 >/dev/null)
       -                exit 1
       -        cat $t
       -}
       -
       -fn getfile9p {
       -        if(! 9p read $1/$2)
       -                exit 1
       -}
       -
       -fn getdir {
       -        if(! {echo cd $2; echo ls -l} | sftp -b - $1 | sed '1,2d; s/sftp> //g; /^$/d' >$t)
       -                exit 1
       -        cat $t | awk '$NF == "." || $NF == ".." { next } {s = $NF; if($0 ~ /^d/) s = s "/"; print s}'
       -}
       -
       -fn getdir9p {
       -        9p ls -l $1/$2 | awk '{s=$NF; if($0 ~ /^d/) s=s"/"; print s}'
       -}
       -
       -$f $1 $2
       -exit 0
       -
   DIR diff --git a/bin/netfileput b/bin/netfileput
       t@@ -1,27 +0,0 @@
       -#!/usr/local/plan9/bin/rc
       -
       -if(! ~ $#* 2){
       -        echo 'usage: netput system path' >[1=2]
       -        exit usage
       -}
       -
       -f=putfile
       -ns=`{namespace}
       -if(u test -S $ns/$1)
       -        f=$f^9p
       -
       -t=/tmp/netget.$pid.$USER
       -fn sigexit { rm -f $t }
       -
       -fn putfile{
       -        cat >$t
       -        if(! echo put $t $2 | sftp -b - $1 >/dev/null)
       -                exit 1
       -}
       -fn putfile9p{
       -        if(! 9p write $1/$2)
       -                exit 1
       -}
       -
       -$f $1 $2
       -exit 0
   DIR diff --git a/bin/netfilestat b/bin/netfilestat
       t@@ -1,52 +0,0 @@
       -#!/usr/local/plan9/bin/rc
       -
       -if(! ~ $#* 2){
       -        echo usage: netisdir system path >[1=2]
       -        exit usage
       -}
       -
       -f=dostat
       -ns=`{namespace}
       -if(u test -S $ns/$1)
       -        f=$f^9p
       -
       -t=/tmp/netisdir.$pid.$USER
       -fn sigexit { rm -f $t }
       -
       -fn dostat {
       -        {
       -                echo !echo XXX connected
       -                echo cd $2
       -                echo !echo XXX directory exists
       -        }  | sftp -b - $1 >$t >[2=1]
       -        if(9 grep -s XXX.directory.exists $t){
       -                echo directory
       -                exit 0
       -        }
       -        if(9 grep -s 'is not a directory' $t){
       -                echo file
       -                exit 0
       -        }
       -        cat $t | sed 's/sftp> //g; /^$/d; /XXX/d; /^cd /d' >[1=2]
       -        if(! 9 grep -s XXX.connected $t){
       -                echo connect failed
       -                exit 0
       -        }
       -        echo nonexistent
       -        exit 0
       -}
       -
       -fn dostat9p {
       -        if(! 9p ls -ld $1/$2 >$t >[2]/dev/null){
       -                echo nonexistent
       -                exit 0
       -        }
       -        if(9 grep -s '^d' $t){
       -                echo directory
       -                exit 0
       -        }
       -        echo file
       -        exit 0
       -}
       -
       -$f $1 $2